For example, the times when you eat matter (even if you eat healthy to begin with). The light levels matter - is your bedroom pitch dark? Noise levels matter. Temperatures matter a lot. Things like sleep position could play a role. Pets sleeping with you waking you up at night. And several other things besides.
Or you might have a condition that prevents you from sleeping well, even if it's not apnea. Might be stress. Or something that needs medical treatment, or a vitamin deficiency. You might also need supplements such as melatonin.
I found that I sleep best with blackout, loud white noise, a very soft pillow under my head, and a firm pillow beside my legs so I can sleep on my back with one leg bent and resting on the leg pillow. The bent leg thing is not something I've ever heard of anyone else doing. I just had to figure it out by trying a ton of different ways of arranging my limbs in bed-- previously I had really struggled with hip pain during the night no matter how I slept.