Yes, with some caveats. If you find an old DVD-ROM copy of The Sims 4 from 2014-2015, the printed license key inside the case is still valid. However:

The Sims 4 license key is your gateway to a world of Sims 4 excitement, creativity, and fun. By understanding the importance of a valid license key and how to obtain one, you'll be able to fully immerse yourself in the game. Remember to always use authorized channels to purchase your license key, keep it safe, and follow best practices for maximizing your Sims 4 experience.

Once you have a legitimate key (from a birthday gift, an authorized retailer, or an old expansion pack), here is exactly how to use it.

A license key is a unique alphanumeric code used to verify that you own a legitimate copy of the software. In the past, this was the primary way to install the game. Today, digital platforms like Steam, EA App (formerly Origin), and the Epic Games Store manage these licenses automatically behind the scenes.