Your only way is piracy. EA was giving away the game on Origin for people who proved they had sims2 cd key, they even gave it for free one time but they stopped giving any cd keys after 2018. Check out torrents or some abandonware sites that have them.
There are two types of downloads. One is basically downloading individual games one by one other is the Sims 2 Ultimate Collection. Ultimate Collection has all the sims 2 expansions and packs but you cannot pick and chose. You have to play with all expansions active which I found overwhelming.
I taken the other route, I'm installing one expansion pack, play the shit out of it and then move to other one. That gradual progression feels nice. I'm not overwhelmed by 20 mechanics, and 20000 items. But the downside is that you have to work a bit to get it running. Ultimate Collection doesn't have that much of a problem as installing the game cd by cd. But thankfully Sims2 still has a very active casual community so you can find plenty of guides on how to fix any problem you have.
Some advice I have:
-Learn about corruption, sims 2 really has bad code and some decisions can fuck your game up especially if you are planning to play long term. Make sure to get moothildas clean neighbourhood tool. There are also ready made clean neighbourhood but i recall they need university expansion at the least so If you are only going to play the base game moothilda is your only choice. Also make sure to regularly check corruption with moothilda from time to time even if you have a clean neighbourhood
-Make sure to download and install patches, the patches don't install on their own anymore but there is a tool to install patches GrumpyLoader.
-Securom remover is also needed as it causes stutter. Make sure to also get 4gb patch, but you might need to move your sims2 exe from tsbin to csbin to make it work. You can check the logs on whether the game sees 4 gb ram or not
-Graphics rules maker is also a needed tool to fix the resolution and graphics in general (make sure to put back exe to tsbin to have the software detect your system then back to csbin again)
-DSVX (or some linux gaming software that has a similar name) can also fix a lot of performance issues. I'm not well wersed in this as my laptop is from the worst period for sims2, early 2010s where dsvx and many other modern solutions do not work but sims2 also doesn't recognize the graphic cards and processors for the era.
So yeah as I said it is a pain, but I feel the really paid off to get it running. I'm taking it slow, just finished university expansion pack ad now exploring the downtown that came with nighttime. I love examining all minute details, reading the item descriptions (often times devs fuck out in those) before moving on. Or Like how there is dust on a tv object. The grumpy sims cheat on chess and so forth. I can still find new things that I never seen or heard before. Really a great game.
Sory for the long rant, I guess I just like the game a lot. Remins me of my teenagehood and good old 2000s. I never had the opportunity to play it fully as I desired (remembering downloading sims2 bon voyage with 128k internet, took me a week) so I have sweet nostalgia.