I am creating a membership site in which the members can create and edit a member profile.
If the member has not created a profile, I want the post form to be displayed when the member visits their profile so that the member can fill out.
If the member has created a profile, their profile content would be visible when they visit their profile. There would also be a profile edit button so the member can edit the profile.
Another possible way could be using View if you have setup Member Profile as post type. So, when member is logged in it will try to find the post where post author is loggedin user for the post type member profile and if it found the record you can add whatever fields you want to display with member profile including edit profile link and if no post found then in the view's No Items Found section you can add the form using which user should be able to register.