I'm creating this question to share the errors i've found trying to enable Customer Portal Users to edit their Account record, and to create new Contact records, and the solution i've found. I do it here because i haven't found a direct and simple answer to understand how to fix the issues.
Let's assume you created your portal users with a profile that have CRUD access to Account/Contact objects.
Also, let's assume you have your Sharing Settings on Account and Contact as Private for "External Access".
Finally, your site Workspace > Administration > Preferences does not allow users to see other members of the site (so they cannot see other Customers nor mention them on chatter).
Error: Portal account owner must have a role.
Solution: You should be sure that all Account Owner Users (your internal SF users) have an assigned Role.
Error: Insufficient Privileges - when trying to edit the user Account or any related Contact record.
Solution: You must go to Feature Settings > Digital Experiences > Settings, and then go down to "Sharing Sets" and create a new Sharing Set. Give it the name you want, add the Profile you are using for your Community Users (i have a custom one so i can set object CRUD settings), select the objects (Account and Contact), and then they will appear down in the "Configure Access" table.
You will see a "Set up" link on Account, press it and set the fields as follows:
The repeat the same on Contact:
Error: portal users cannot own partner accounts - when creating new Contact.
Solution: You must create 2 Record-Triggered flows as follows:
You must add a Formula on both flows, this is important:
On the decision i'm using "CspLitePortal" as my Portal Users are using the "Customer Community Login" license. You must double check this!
Then you clear the Account field so the Contact could be created having the Portal User as Owner (later we will fix this on the second flow):
Remember to activate the flow.
Now on the second flow on the answer as i don't have enough reputation points.