Identifying iPhone GPS issues
The best bet is to take it into an Apple Store and have them run diagnostics on the device. This won't take long to do, and there'll also be a record of it on their systems.

If an Apple Store (or authorised repairer) is not convenient to you, Apple can also run diagnostics while you're on the phone to them.

Regardless, the diagnostics will identify any hardware related issues on your iPhone and that's really the best way to troubleshoot it.