One of the easiest ways to see whether you have excessive sideways movement in your swing (sway) is to check your head movement. If your head remains relatively still during the swing you can be sure you are not swaying. If you are not swaying you are staying centred on the ball and this will improve your ball striking and consistency.
Here is an easy way to check whether your head is moving during your swing. Early in morning or late in the afternoon on a sunny day place a small cardboard box on the ground so that the shadow of your head falls on the box. Watch your shadow as you swing and try and keep it from moving off the box.
You will only be able to do this on practice swings but you can do it repetitively and use it to build a sound and stable and consistent swing.
It is also useful to observe whether there is excessive up and down head movement. This could indicate that there is excessive variation in your knee flex which will affect the accuracy of club head/ball contact. You should try and keep your knee flex constant throughout the swing.
Here is an interesting alternative technique to keep your head still. Keep your head still.
Lastly, it is important to remember that you need to keep your head still through the back swing and then through the down swing until shortly before contact with the ball. As you rotate and shift your hips forward through impact, it becomes necessary to tilt the upper spine slightly to the right (backwards) to maintain balance. This is a small and subtle shift. You will know you have achieved it if you have a sense of the head being slightly behind the ball at impact.