in general, it’s called geolocation, and it’s based on latitude and longitude
MySQL version 8 stores spatial data using different types of geometry data types such as POINT, LINESTRING, and POLYGON
i haven’t used any of this stuff, but here’s an article that will get you started –