Your legs have an important job during your backswing, and that job is to do nothing at all! Think of the ground floor of a 10-story office building. It has to be strong and solid to support the rest of the floors. If it moved like during an earthquake, the whole building would fall down.
During your backswing as your upper is turning back and coiling behind the ball, your lower body should remain very quiet or solid. I call it the wall because both of your legs will act as two brick walls. They support the upper body and don't move much during the backswing. Every athlete in every sport has a wall. As a tennis pro swing the racquet back his legs plant and create the foundation.
If you sway or knock your wall over you'll have a difficult time returning back to the wall squarely. Even Ben Hogan's great back over 50 years ago mentioned the role of the legs during the backswing. Hogan said don't move them too much and I agree. The photo shows a club leaning against my back leg. You should be able to swing your upper body back without disturbing the club. You'll also create coil between your upper and lower body that will add power to your golf swing.