How to use a database?

Hello. I have some experience with programming, And I wanted to play around with unity to make a game. I did the c# tutorial by Bob Tabor provided by microsoft however in that tutorial they neer wen into how a database works.

Lets say I make agame where The player can pick up and use items. I would make an item class to specify all the properties that items can have, like int dmg, int durability and what not, maybe a method or two for armour penettration or something.

Now if I want to create an object of the class, let’s say a wooden sword, I would have to make an instance of that class in code and assign all the properties, like woodenSword.dmg = 20.

But I don’t understan how that works. Does that mean that every time I start my game all the objects have to be created there and then on the spot. What if I have 400 items? That’s where I’d imagine storing the details in a database and just calling for them once the game needs them would make sense.

Is that something a database would be used for or do we just declare all items as the program starts. Or am I really confused and have completely the wrong take on this? Any help greatly appreciated.

for a simple game you’ll probably not need a “database” (sql/oracle/whatever) just a way of storing data about “things”, which is where ScriptableObjects come in