Warming up for a heavy set
Five minutes and three ramp-up sets. Neither twenty minutes of stretching nor walking in cold.
What it does and what it does not
Warming up raises muscle temperature and lets you move the weight better on the first set that counts. What it does not do is prevent injuries on its own: that comes mostly from not overreaching on load and volume. Selling a warm-up as injury insurance is selling smoke.
The short recipe
Two or three minutes of something that moves your whole body, then ramp-up sets of the actual exercise: empty bar, 50% for five reps, 75% for two or three, then the working set. Each ramp-up gets the minimum reps: the one that leaves you tired is not a warm-up any more.
Static stretching: afterwards
Holding a stretch before you lift drops your strength slightly for a while. It is not a catastrophe, but if you are lifting heavy, leave it for the end of the session or another time of day.

The two that deserve care
Shoulders and hips. A couple of light sets of the movement you are about to do, through its full range, changes how that first heavy set feels.
More on Hypertrophy
How many sets a muscle needs per week
The number that decides whether you grow. Not four, not forty.
Close to failure, not always to failure
What RIR is, why you leave one or two reps in the tank, and when to push.
Progress without stalling: double progression
When to add weight, when to add reps, and why not both at once.
How long to rest between sets
Two minutes is not a quirk: it is the reps on your next set.
Once a week per muscle is not enough
Why splitting your volume over two or three days beats one hammering.
Protein: how much and how to spread it
The daily total is what matters. The exact timing, far less than you hear.
This is general information written from the training literature, not medical advice or a personalised plan. If you take medication, have a health condition or something genuinely hurts, the person to ask is a healthcare professional.