@sleepingbeauuuty Please download Revo Uninstaller (the free version is fine) and look for anything Sims 4-related. The only folder that you should NOT delete is the user folder inside Documents > Electronic Arts, if it still exists; let Revo remove the rest, that is if it sees the game at all. Either way, use Revo to uninstall the EA App as well.
Restart your computer, and create a new folder into which you'll install Sims 4. The folder should be on the root level of the C drive (or an external if you're using one), for example C:\Games is fine, but not C:\Program Files\Games. Reinstall the EA App and try to install Sims 4 into that new folder.
If you use a third-party antivirus, disable it before installing the EA App, and don't reenable it until you've launched Sims 4 at least once, or until the download fails again. As long as you're not doing anything else at the same time, your computer should be safe.
For Sims 3, please manually install DirectX 9, as described here:
https://answers.ea.com/t5/Technical-Issues-PC/Sims-3-launcher-won-t-open/m-p/10711778#M247861
Then apply one of the workarounds in this post:
https://answers.ea.com/t5/Technical-Issues-PC/Sims-3-won-t-open-Alder-Lake-Intel-12th-gen-CPU/m-p/11528168#M250997
To be clear, you'll need to do both—you're seeing the first error right now, but once you get past that, the second one will come into play. For the second error, apply the workaround of your choice to TS3.exe, without the W, since you have an EA App install.