Which heart rate is used
A run uses one heart rate source, never a mix. It is the device that recorded the run, when it wrote a reading at least every 5 minutes. Otherwise it is your Apple Watch, if you wore it, then whichever other device has the most readings.
The run's heart rate chart says where it came from, such as Heart rate from Garmin, and says why when it is not from the device that recorded the run.
A run's average heart rate counts each reading for as long as it lasted during the run. When the device that recorded the run saves its own average with it, that is the average shown.
Garmin saves a run's heart rate to Apple Health in a save of its own, after the run. Until it arrives, the run takes its heart rate from another device, and Why Not reads the run again every hour for 30 days, taking the heart rate of the device that recorded it as soon as it arrives.