Adding @preconcurrency in front of import HealthKit will save you from headaches when sending HK objects up and down as many of HK's moving parts are not @Sendable.
@preconcurrency
import HealthKit