Make sure your iPhone system version is ios 14 or above, and you have authorized the health app to access your health data.
Find and open the Health app on your iPhone home screen.
Click the "Browse" tab at the bottom of the screen, then click the "More" button (three dots icon) in the upper right corner and select "Export all health data."
Select the exported data format. The csv format is generally recommended because it is easy to view and process in most spreadsheet programs.
After confirming the export request, the system will prompt you to verify your identity through face ID, touch ID or device password. After successful verification, the data will begin to be exported to a folder on the device.
After the export is complete, the exported health data file can be found under the "icloud drive" or "on my iPhone" folder in the "Files" app.
You can send exported health data files via email, Messages, or other file-sharing apps, or back them up to a computer or other storage device.