I'm on Windows 11 and the game works for me, so I don't think that's the issue.
You might have a similar issue as noted here:
https://answers.ea.com/t5/Technical-Issues-PC/So-Bad-Company-2-is-missing-from-my-account-now/td-p/13663115
I made a support case, as noted there, and that got the game re-added to my library. I think the only way or one of the only ways to play multiplayer now is to use Project Rome, once you get the game re-installed. But last couple times I played it there was hardly anybody playing. Pretty empty server rooms. It's a bit of a hassle to get PR set up, but at least it works to see/play again the game we all know and love. There was a YouTube video explaining how to install PR, which helped a lot.
I wish EA could just keep a couple official BC2 servers online, one being Hardcore Conquest, so fans of the game can play forever without having to resort to 3rd party servers. Battlefield 2042 pales in comparison, and I'm tired of BF games having mini maps showing icons for all the players, sniper lens light glint/flares everywhere, body awareness (player collision boxes jiggling with nearby collision objects/walls especially when lying prone), and a number of other things. Just bring back solid BC2 gameplay back. BF games have become a lot of glitz and glamour, foresaking gameplay and tight user controls, imo.
After uninstalling BF2042 and not playing it for a few years, I recently reinstalled. It's a bit better, but the fact there is no true Hardcore mode, you can paint enemy players non-stop, and sniper scopes still have light glints means I'll uninstall it again soon. It's just made for a different target audience than me. More of a CoD one, imo. Which has actually been the case ever since BF3