First of all what engine (if any) are you using to make your game? Unity? Unreal?
Also if it happens to be Unity (or something similar) then I would create a game manager script that detects when the player is out of cards then makes a call to your card reloader script to refill the player's inventory.