Staying in one spot (being neutrally buoyant) is a primary skill.
Getting your weighting right is a first step. Maintaining a horizonatal posture (trim) without effort would be next. Tank position, arms position, head position and bent knees are things to think about.
While diving, regulalry stop moving, assume a more vertical posture, relax, and either watch the reef or your computer whle maintaining shallow breathing. Depth compensate with very small, short, quick bursts of air in or out of the BCD. Don't continue until you are totally neutral at that depth. Be patient. You'll need shots of air into the BCD once in a while to stop from sinking as you descend, and vice versa during ascents. Make constant tiny adjutsments.
Once you get that roughed out, you will be able to make minor adjustments to your vertical position, to get nice and close to things without floating away or bumping into them, just by using your lungs.