I usually do a couple of warm-up sets, usually just 4-5 reps each, gradually increasing the weight each set.
I.e. if you’re aiming for 300 lbs squats, start with just bodyweight-only squatting, then squat 100 lbs, then 200, and then start your working-sets. This will help insure your joints are properly lubed-up, your muscles are warmed-up, and your CNS is dialed-in for a big, compound lift. You don’t really need this level of warm-up if you’re doing a simpler lift such-as bicep curls or similar, but for heavy multi-joint lifts like cleans and squatting, it’s quite helpful.
I stick with just 4-5 reps each set to make sure I’m not exhausting the muscle before the actual working-set.