The purpose of your golf backswing is to load up as much power as possible, ready to unwind and release that power to accelerate the club head into the back of the ball.
The correct way to load the power during your backswing phase is to make a large rotation of your upper body against a stable platform or base of your lower body and your lower legs.
However, many golfers incorrectly sway all of their body weight onto their rear leg, with the misguided view that this will automatically generate more power into the downswing.
To correctly load the bodyweight into the backswing, feel how your shoulders should rotate to approximately 90°, your hips should rotate to approximately 40°. Your bodyweight should still be loaded to the instep of your rear foot, with your rear knee flexed.
At this stage, you should feel loaded, primed and ready to push forward off your rear leg. If you've incorrectly loaded your rear leg, you may feel that the rear leg is either locked or that the body weight is positioned over the little toe or the outside of the rear leg. This becomes increasingly difficult to push off from and it will have resulted in an upper body swaying action which is neither powerful, consistent or easy to control.
To correctly understand your bodyweight shift, so that it does not become a sway practice, making some swings face on into a mirror and try to resist any swaying action as you load up.