Train your legs first. First at the side of the pool. Once you
are pretty comfortable kicking for a long time without feeling
tired, get a float.
Use that float to keep your head above water. Swim for 2 laps and
increase gradually, just kicking only. Practise for a few weeks.
After that, learn how to pull up properly. Not doing properly can
make you drink water, plus run out of breath fast. It can also slow
you down a lot, because the pulling up motion can help you move a
distance.