An AirTag has no method by which to independently detect its location (it doesn't have GPS), or directly report/transmit its movements.
An AirTag is effectively little more than a "beacon" that broadcasts its unique identity using Bluetooth, this beacon signal being detected by other Apple devices such as your (or someone else's) iPhone.
When an iPhone detects an AirTag (which in ideal conditions will be within 10m/30' of the detecting device - or for AirTag2 and a recent model iPhone, potentially as much as 100m), the iPhone will anonymously and securely report the detection of the AirTag's unique ID to Apple's back-end servers, along with the location of the iPhone. As the AirTag will be within a short distance of the detecting device (for which the location is known), the location of the AirTag can be inferred with high confidence.
As such, unless in proximity of an Apple device participating within Apple's Find My network, your AirTag's location cannot be reliably detected or reported. When detected, the reported position will be at that point in time - and will not necessarily update in real time. Quoted detection ranges are in ideal conditions; any objects between the AirTag and detecting device will attenuate the Bluetooth signal - and in so doing will reduce the effective signal-detection range.