As Heath says, you are using this tutorial which you need to follow carefully.
https://support.wix.com/en/article/corvid-tutorial-building-your-own-members-area
If you are struggling with it then watch Nayeli (Code Queen) old youtube guide for it.
https://www.youtube.com/watch?v=Orl8GJNzG5s
Just remember that as the tutorial says, you are creating your own separate members dataset of which is only filled in when the user has signed into your site as a site member and can access their profile to add or edit whatever is on your profile user input form.
All additions and changes that the user makes to their own unique profile page on the update profile page will be saved into the Members dataset.
You will still need to use Wix default or custom login/signup forms or your own custom login/signup lightboxes using the register and login functions.
https://www.wix.com/corvid/reference/wix-users.html#login
https://www.wix.com/corvid/reference/wix-users-backend.html#login
https://www.wix.com/corvid/reference/wix-users.html#register
https://www.wix.com/corvid/reference/wix-users-backend.html#register
Also remember that this users Wix Users and can’t be tested through preview, it needs to be tested in the live mode.
The APIs in wix-users are only partially functional when previewing your site. View a published version of your site to see their complete functionality.
Plus. also note that each profile and update profile page is unique to the site member with that id, so if you are not that user you will not have correct permissions to view it.
Finally, note that you are directing the user to the update profile page.
wixLocation.to(/collection1/update/${wixUsers.currentUser.id}
);
You are better off directing the user to their profile page only.
wixLocation.to(/collection1/${wixUsers.currentUser.id}
);
As stated in the tutorial itself.
When the profile button is clicked, we use an event handler to send members to their personal profile page.
We add an event handler by selecting the profile button and we use the Properties panel to add a handler for the onClick event.
Then we add the event handler code, which looks like this:
export function profileButton_click(event) {
wixLocation.to(`/Members/${wixUsers.currentUser.id}`);
}