Online Batle card game storing player cards and decks

So im making an online BCG and I made my cards from scriptable objects now im trying to figure out how does unity or game devs store their assets on server. for example a player will have multiple decks, or cards. thats info that should be server side not client side. I come from a software engineering background so the way i think of it might be to complicated so what are the best practices in terms of game design?

This should be also similar with the pattern of software engineering. Do you have a dedicated server? I dont know whats your online game architecture looks like.

But the simplest & unsecure way is to let client send their list of cards (or decks) as json to a certain database (let’s say firebase).

If security is a concern, you need a fully dedicated server, which client can only send input or action & client dont have to store any owned card on the game.

for example: player click on button gacha card, it calls the rest api HTTP POST. So the server would process every player action

right now i dont have a dedicated anything im in the research stage. Ive been told that its kinda overkill the way that im doing it. I cant think of any way to store player data. like if you store deck info in the game (if the game is on the server) instead of being in data base then how do we persist that info so when the player logs in the info is able to be called back again. like would it be on their side like their local machine i kinda dont like that.