Distance swimmer here.
I’d agree on using legs for mostly balance. Yes, you get some thrust from them, but for any distance IMO it just isn’t worth the energy expended.
Focus on making yourself as 'long' as possible for as much of your stroke as you can — that means one arm forward for your entire glide — and toes pointed rearwards. I keep seeing runners going super-slow because of this — even tall guys who should be faster than me (Froude’s Law).
Energy used for splashing doesn't help your forward motion. Look to slide your hand into the water like you're reaching through a letter slot on a door. Learn to use your forearms for 'push' (do some laps with your hands balled into fists - it gets easier - and when you open your hands they'll feel like dinner-plates). Practice 'the catch'. Your active arm(s) get best traction in relatively still water. Practice a pause between hand(s) go forward and starting a pull.
Match your stroke speed to your breathing. If you want to go faster, breathe faster first, then match with your stroke. Pay attention to how the water is flowing around you. Ditch the swim cap for at least some practice and pay attention to turbulence around your head.
Most obvious on a breaststroke, but true for all of ’em: sometimes it feels more efficient to continue your arm drive as far back as possible — but that often means you’re losing more on recovery than you gain in the drive. We’re all different proportions, so experiment with how far back works for you for each stroke.
Finally, I'm a 'sinker'. If that's you, too, try a sidestroke - your face only needs to be above the surface for the inhale, and if you're moving, there'll be an air pocket. If you're in open water put your back towards the waves - or learn to breathe water :-) For anyone else wondering: yes it sucks to not be able to float if/when I get a cramp out in open water. Sigh. Hydration and magnesium makes them happen less often
My $0.02