Try connecting it over the USB cable to a computer with Garmin Express, checking for updates there, and installing any pending updates. Reboot the watch when completed.
If it does not help, follow the instructions in the thread https://forums.garmin.com/outdoor-recreation/outdoor-recreation/f/fenix-7-series/362033/fenix-7-heart-rate-not-detected/1738873#1738873 for reinstalling the firmware.
If still no go, reach out to the Product Support at https://support.garmin.com