I don’t think you can do nested ‘IF’ statements. I have used multiple formula fields to cascade the result of one formula field to another. You can setup multiple ‘IF’ statements this way.
As it happens, I have created the same page that you are working on. I setup a second model to get the PermissionSet names where the ProfileId is not null. This model is the first in the list.
I then created 2 UI Only fields, one to lookup the Profile Name from the PermissionSet model and a second to check if the Parent.Name of the ObjectPermission starts with an ‘X’. If it does, I show the model lookup field. If not, I show the Parent.Name from the table model.
Here is the model lookup formula. Field is called ‘ParentModelLookup’:
Here is the IF formula to set a UI only field to display the PermissionSet/Profile Name: