To see from the computer where the iPhone is located:
1) The iPhone must be allowed access to the Find iPhone service.
You can check this by opening Settings – Privacy – Geolocation Services – System Services – Find iPhone.
2) The Internet should work on the iPhone.
3) To view the location of the iPhone, you must sign in to iCloud using your login and password, select on the page that opens “Find iPhone”, then the map with the marked iPhone location will open. You can also see the level of battery power, remotely play an audio signal, erase all data, or enable the loss mode.
The Find iPhone service can also be enabled on other Apple devices, such as the iPad, MacBook, Apple Watch, etc.
Through the installed standard application “Find iPhone” you can see these devices.
By the way, to share your location with other users, there is a separate application “Find Friends”.