I would presume. It's tied with your sleep schedule or manually turning it on before sleeping.
Also if the phone is not close enough it may not detect it.
Lastly might want to consider buying a watch
⌚️ and the seem to work better.
And yeah it could be a bug as well. Lots of people who downloaded the big August update had issues on older phones like the s23 series etc.
Follow Me, like my posts and Mark as Solution if I helped solve your Problems.