Does the Health App in iOS sync intraday to iCloud?
Your Health data is backed up to iCloud as part of your device's backup. (Your device backup includes data stored on your phone by apps, your Settings, the layout of your home screen, etc.)

I'm guessing you have iCloud set up to automatically back up your device each day, which it typically does each night when you're at home connected to Wi-Fi. So when you restored your phone, the iCloud backup you restored from probably had all your Health data up to about the end of the previous day.

This is different from how other apps sync with iCloud. When you (e.g.) create a new task in Things, the Things app probably saves that data to iCloud right away so that you can see it on your other devices, etc. So unlike your device backup, which was only current up to the previous night, your other apps/services that use iCloud were probably current up to the moment you experienced your problem.