Most windows 98 games you actually want to play will work just fine in windows XP - albeit with patches and wrappers. Quake II, Quake III, unreal, unreal tournament, diablo, starcraft, half life, thief 1 and 2, ect and ect and on and on are all going to work just fine on XP or even a windows 10/11 machine.
The troublesome games are all between 1998-2001. Any earlier and you can almost always play it in DOSbox, and any later it likely uses new enough versions of directx. For sure there are titles that you won't get to work in XP, but chances are better than not that if it was a good game from that era there exists a GoG version that will run just fine.
If you have faster CPU (like haswell or even sandy bridge) then you can try PCem. It's a proper PC emulator. My haswell based XP machine can emulate a pentium MMX at 166mhz pretty well with a voodoo 2. The performance isn't great, but it will be good enough to play many of the games that don't work in XP.
As for the optimal GPU for XP games that's tough to answer. It's less about architecture and more about drivers, and it can get very specific. I don't see a good reason to believe an earlier card than the gtx 960 is more compatible in any meaningful way. Older GPUs also had bugs and bad patches/driver versions too, so it's not even like going older always equals more better. Just play the games you want to play and be willing to go to places like the pcgamingwiki or the archive on these forums if and when you ran into problems.
You will do fine. XP is an excellent platform for reto prc gaming.