For a before and after comparison, or a set of pictures in a guide, dragging a selection by hand never gives you quite the same frame twice. You can give the coordinates instead.
screencapture -R 0,0,1280,720 ~/Desktop/step-1.png
The four numbers are x, y, width and height: where the top left corner of the rectangle starts, then how big it is. Run it again with a new file name and you get the identical area.
Add -x if the camera sound bothers you, and a small loop gives you a series:
for i in 1 2 3; do
screencapture -x -R 0,0,1280,720 ~/Desktop/frame-$i.png
sleep 5
done
I’d put the window I’m documenting in the corner first and then adjust the numbers until the frame fits. It takes a couple of tries and then it is repeatable.
The numbers are screen points, so on a Retina display the saved image usually has more pixels than the width you typed. The coordinates point at the screen and not at a window: move the window and you capture whatever is there now. macOS may also ask you to allow screen recording for your terminal app before other windows show up in the result.
Further reading: Take screenshots or screen recordings on Mac