A little help with saving data

Hello, I am looking for a little help in understanding how to best save data that is unique to a particular member.

I have seen information on how to connect an input to a dataset and to a database using standard functions but this doesn’t seem to do updates instead of inserts in anyway that I can see. If they aren’t a member what would it even update on? So I understand this.

However if they are a member I would like to take inputs (not a form currently) and save these entries to contact fields, or even better member fields as I want this to be really for people who login.

The end goal is something like this.
Someone, member or not, enters in some personal data on a page such as age (birthday would be better long term so it changes) weight, height, etc… This data gets used in multiple areas of the site to provide recommendations and calculations. If the member has already entered in this information it should be populated when the visit a page by default so they don’t have to constantly re-enter it. Eventually this will be fairly complex data like picking meals and exercises and forming a plan.

I have tried to find some good information on best practices on how to handle this and I see some information on some topics but it isn’t clicking for some reason.

My first idea was in the members pages to create a form to capture some of the biographical data that I mentioned, however this typically writes to a contact and not a member. Would it be best to create a custom database somehow using their id as a key field? I don’t see how to do this as each entry into fields always seems to insert a new row into the DB instead of an update. I could then hopefully join to the privatememberdata since this is read only and combine their standard data with the custom entered data.

Any resources that clearly explain this kind of thing would be really helpful. I have played around some with changing values in a radio button with data from a database so pre-selection I have no problem with once I can get it stored in a good format. I still need to play with presenting and modifying complex database data as well such as a meal plan.

You can use this members profile tutorial here to create member only pages that they can edit or change etc.
https://support.wix.com/en/article/corvid-tutorial-building-your-own-members-area