It doesnt all come from the legs bro ,thats another expression people hook onto and repeat.
Power comes from many things,firstly your mind.
IT comes from a solid fist (not a loose one)
It comes from having your self alighned behind your shot (body weight,as well as bones in arms as well as turning or twisting into some shots.
Footwork can relate to power too. Stand in front of your bag and hold your arm and fist out straight and walk into the bag fast ,see your legs have shifted your weight through the target.
Now bend your knees slightly,walk through like before but raise your body by raising your heel and straightening your knee and it puts more power into the target (and you havent even thrown the punch yet
Now put it all together and throw a "light" straight jab as you shift your bodyweight through and raise the rear heel with a light top of body turn on impact into the punch as well as straighten the leg.

SEE.

Dont practice all that straight up and damage yourself though.
do it in sections and then put it all together.

get your wrist locked in position .try elbow down and a vertical fist with your shoulder in behind the movment and straight shot out just to start with.

Then experiment with tagging it onto your foot moves .
HAve fun experimenting with hooks ,overhand bombs vetical fists jabs, horizontal fist jabs,angled hooks in between an uppercut and a hook etc etc.

Ducking a shot (bending all your joints down hips included) going under their arm and comming up with an uppercut would be the most leg power and joint flex that you could transfer into a shot as you raise your whole body weight up and into the punch.