I think I will need more information to give you a good solution.
How do you link the cart to a particular user exactly?
One way of making separate accounts is just creating a non persistable entity to collect all the data from a form to create the account inside a microflow. I don’t know if you are doing that currently.
If you could give me more details about your problem I would appreciate it!
You will need to look at using XPath to constrain the data to specific users.
It’s quite a big area, so I’d recommend you look at the Mendix Academy where they go into this in depth. Section 9 of the Crash Course is a good start, in particular 9.7.