Can i put these items in a garage?

We live in a 2 family house and have a garage. My closet isn’t exactly big but i have lot of things there that i don’t want to throw out. Some electronics, monitors and some old books that i dont read but i dont want to throw them out. It basically takes up 1/2 of the closet. Other half are my clothes etc.
I wasn’t exactly sure if putting any electronics in a garage would be safe in when it rains/snows b/c water can get into the garage. Are there anyone that put electronics in a garage? The issue i see is if it rains and theres a huge flood, that might cause lot of problems. I have a desktop computer with 2 other monitors as well that i have on the 2nd floor which takes up a lot of space. Also have some old video game systems that i no longer play anymore as well but dont want to throw it out. Basically all these things are in 2 boxes in the closet that once you open the closet, it looks pretty bad. I would prefer to just take these boxes out and put it in the garage.
Advice on this?

Keep them a few inches off the floor and cover them in a tarp or something else waterproof.

If they are within a few inches of the foor and you cover them with a tarp they can collect a lot of moisture. I would get them up higer and make sure air can circulate around them if they are covered unless you have them actually in a sealed container.

I ruined a lot of my small scales and digital measuring devices by covering them with a tarp in my storage shed. Roof and walls don’t leak but floor gets wet.

Shelves.
Wonderful things.

Are you in hot/humid? Cold/wet? If concerned about rust, open and spray WD-40 or better water displacement product. Especially electronics.
Books need to be kept dry or will develop mold/mildew - maybe plastic storage boxes - if airtight.

This is how hoarding starts. Nobody needs or wants old computers, video game consoles or books that aren’t genuine first edition collectibles. If you haven’t used it in a year and won’t be using it in the forseeable future, get rid of it. Electronics can go to a recycling center and books to a local library or recycle bin.

^This +1,000,000

Why do you want to keep these things? Chances are very good that they have less value than you think they do. Nothing ages faster than electronics.

Ah Yes, Since the question has set awhile, let’s attack the OP.
Anything to keep a conversation going…

If the OP wants to horde, of what concern is it to the rest of us?