Greetings hiba257,
Thanks for using the Apple Support Communities! I understand your iPhone isn't tracking your motion & fitness, even though you have the appropriate setting enabled on the iPhone.
Let's have you review the settings, and ensure the proper settings are enabled for your motion and fitness to be tracked. The first setting to check would be through the Privacy setting on the iPhone. The following support article will show how to enable Motion & Fitness:
Use the Health app on your iPhone or iPod touch
Specifically, the following section will show the steps:
If Health doesn’t track steps or other information from your iPhone or another device, tap the Sources tab and tap your device or accessory under Devices. Then tap Privacy Settings > Motion & Fitness and make sure that Fitness Tracking is turned on.
If you have Fitness Tracking enabled there, and you have the applications you use to track your Health enabled within that setting, then let's have you restart your iPhone and test the issue once more:
Restart your iPhone, iPad, or iPod touch
If the behavior persists, another helpful step would be to reinstall the iOS software on your iPhone using a computer with iTunes. Reinstalling the software won't cause you to lose data with your iPhone, however I suggest creating a backup with iTunes or iCloud first:
How to back up your iPhone, iPad, and iPod touch
Although the name of the support article is different than the issue you're experiencing, the steps for reinstalling the software of your iPhone can be found in the following guide: If you can't update or restore your iPhone, iPad, or iPod touch
Let me know how the provided suggestions work for you.
Kind regards.