Before you can float you have to master breath holding for at least 15-20 seconds and stay relaxed. A hot dog floats in water without lungs.
Archimedes’ Physics Principle states that you are buoyed up by a force equal to the weight of the water you displace. If you expand your lungs more fully you displace more water.
You float first and swim second. A major reason why you think you are not floating is because you are not level in the water like an air mattress. An iceberg has 7/8ths of its mass underwater. If you are vertical and not level that only leaves the top of your face and head but not your mouth so you think you are not floating.
It’s rare that a person will be negatively buoyant and slowly sink. This is caused by very small lung capacity and less than 6% body fat. Yes, fat displaces more water than muscle mass. Your swimming stroke can be modified to overcome that slight problem.
To get spatial awareness and know what floating level feels like simply lie down on your mattress or floor. Stretch out your arms placing one hand on top of the other so your upper arms are pressed against your ears. Now place your forehead down on the mattress. You’ll have to hold your breath because your mouth will be pressed hard into the mattress.
Also keep your legs together and point your toes to get streamlined. You’ll copy this position in the shallow pool or on the top concrete step to feel yourself floating free.
Remember that your head controls your body position. If your head goes up, your lower body half will go down. You can counter that by forcing your upper half downward to keep your lower half upward to float free.
Now fully inflate your lungs and try to relax all your muscles but keep your body position. If you start to feel like you are going to rollover simply suck in your stomach and slightly bend forward at your waist.