On your iPhone if your find my iphone feature is not working then it can be if the find my feature is not enabled or due to poor wifi internet connection or your iphone is not connected to wifi internet and dont have internet access or due to restrictions or maps not getting updated or icloud not connected properly with iPhone and you need to enable location services on iPhone.

Use of Find My App on iPhone
Find my app on iPhone is a very useful feature and it helps you track your iPhone if lost and makes it easy to track devices and you can keep track of your iphone and mac and other devices if find my iphone is enabled sync to icloud.
Why is Find My iPhone Not Working For One Person

If find my iPhone of other person is not connected to wifi or location services are not enabled and are kept disabled on iPhone then iphone find my iPhone will not work for that person and after enabling location services and connecting to wifi network again will start working find my iPhone for one person.
Enable Find my on iPhone
Step 1: Open settings on iPhone
Step 2: Tap on your Apple iD name.
Step 3: Tap on Find My and turn on Find My iPhone and toggle the button next to it to enable it.
After turning on Find My on iPhone then your find my app on your iPhone will start working and you will be able to track your lost iPhone.
Check and Connect iPhone to wifi internet Connection and Mobile Data Connection
If your iPhone is not connected to wifi internet or mobile data then find my iPhone will not work and you need to disconnect and reconnect to wifi network or mobile data on your iPhone and connect it to internet.
Enable and Disable Airplane Mode
Open settings -> toggle button next to Airplane mode and turn it off and you can also turn off airplane mode from the control center on your iPhone.
Turn on Location Services
Step 1: Open settings -> Tap on Services
Step 2: Tap on Location Services and turn it on.
If location services are not enabled on your iPhone then find my iPhone will not work as it will not update location services.
Set Date and Time to Automatic
Step 1: Open settings -> Tap on General
Step 2: Tap on Date and Time -> Enable Set Automatically and toggle the button next to it.
If date and time is incorrect on your iPhone then find my iphone will not work properly.
Turn on Fetch New Data
Step 1: Open settings on iphone and Scroll down and tap on Mail
Step 2: Now, tap on Accounts and Tap on Fetch New Data
Step 3: TOggle button next to push and enable it and tap on Automatic.
Allow find My to Share Location
Step 1: Open settings -> Tap on Screen Time
Step 2: Tap on Content and Privacy Restrictions
Step 3: Tap on Location Services and Enable it and Tap on allow Changes and allow changes when you share location.
Update iPhone to Latest iOS Version
Open settings -> General -> Tap on Software updates and tap on download and install new version of iOS.
Running an outdated version of iOS on iPhone can cause find my iphone not to work and after updating iPhone to latest iOS find my iphone will start working.
Why is Find My iPhone not showing location
If location services are turned off and sharing location is turned off or not connected to wifi then find my app will not show location and you need to turn off restriction and allow location services.