Using an unauthorized activation code (keygen, cracked serial, borrowed code) for The Sims 2 is copyright infringement and violates the EA EULA. It risks malware, account bans, and non-functional games.
The Sims 2 uses SecuROM DRM (disc check) and 16-bit installer (won’t run natively on 64-bit Windows 10/11).
If you own the discs, contact EA Support with proof of purchase (photos of discs/manuals/case codes) — they may grant the Ultimate Collection to your account.