I usually don't keep duplicates unless there's some notable difference in the games- for example, I techinically have 3 copies of Shadow of the Colossus: the original, the remaster, and the remake. Very little difference in content, but graphics changed & I love that game, so I keep them all. I also tend to keep console/portable variants- they're usually different, but even when they're not the portable makes a big enough difference to hang onto. Otherwise, I give away spares- when I got the upgraded versions of Horizon: Zero Dawn & Final Fantasy 15, the originals went to my fiancé & his siblings. We've actually got a couple of copies of Monster Hunter World floating around with no purpose, since everyone bought the Master Edition with Iceborne. Not sure what we'll do with those- there's no one to give them away to in our group anymore!
I do keep multiple copies of one game around- Burgertime. I screwed up & bought an Atari version of the game thinking it was an Intellivision version (I really wasn't paying attention.) When I got home, I found out I'd made that mistake & I already had the Intellivision cart anyway. So I said to myself "You know what? Screw it- I collect Burgertime carts now!" I now have that game on Atari 2600, Intellivision, Colecovision, Atari 7800 (in the 'beef drop' homebrew), and NES. I need to pick up that Burgertime Party game on Switch once it gets cheap.