But u can make a bool value for each item. And when the player is leaving u can check what the player currently has in their inventory and check the bool values for that item. Then u can save the bool values. Then when the player is added u can see what bools r true and add back whatever items r true.
Maybe try this one: Open Sourced Inventory/Backpack system
I haven’t used it myself but u can give it a try. Also u can try searching up on how to make ur own inventory system and there r many YT vids and dev forum posts on it.