TestingCheats (or Testing Cheats) is the first step to unlocking the most powerful cheats in The Sims 4. Without first enabling TestingCheats, almost all other cheats are locked out.
To enable TestingCheats, you first need to open the cheat console. On PC, you do this by holding Shift and Control, then pressing C. On Mac, you do this by holding Shift and Command, then pressing C. On PS4, you do this by holding L1, L2, R1, and R2. On Xbox One, you do this by holding LT, LB, RT, and RB.
The cheat console is a thin white bar that will appear at the top-left corner of the screen. From there, you type the cheat you want to enter. Cheats must be entered exactly as written including any spaces, periods, or underscores. However, they are in many cases not case-sensitive.
Some cheats require the use of "shift-clicking" the target Sim; these tend to be referred to as "Shift Cheats." On PC and Mac, this means to hold down either Shift key while left-clicking the target. On PS4, this means press Circle and X simultaneously while hovering the cursor on the target. On Xbox One, this means press A and B simultaneously while hovering the cursor over the target.