Approach in creating a loot bag system and also inventory system

Hi!
So I am wondering on how I can implement a loot bag system and how I can save the inventory in an efficient way.

explanation:
Loot bags are dropped rarely whenever a mob is killed, players would then access the bag and can click the things that they want and it will go to their inventory.

Problem:
The problem is, I don’t know how to approach the loot bag system and also I don’t know how to approach on how to save inventories.
image

PS:
for example, random loot is chosen, I want it to be stored within the dropped loot bag, and when player interact the loot bag, the loot will be replicated to the ui (ik this part) but idk how to store information inside the loot bag.