See the following from Two-factor authentication for Apple ID - Apple Support
When you sign in on a new device, you’ll
get a notification on your other trusted devices that includes a map
showing the approximate location of the new device. This is an
approximate location based on the IP address the device is currently
using, rather than the exact location of the device. The location shown
might reflect the network you're connected to, and not your physical
location.
If you know you’re the person trying to sign in but you don’t
recognize the location shown, you can still tap Allow and continue
signing in. However, if you ever see a notification that your Apple ID
is being used to sign in on a new device and you're not the one signing
in, tap Don’t Allow to block the sign in attempt.