In the Find My app on your iPhone, you can turn on separation alerts for an AirTag or other item so you don’t accidentally leave it behind. You receive an alert every time the device sharing your location separates from the item.
You can also set Trusted Locations, which are locations where you can leave an item without receiving an alert.
Note that in order to receive separation alerts, make sure you allow notifications for the Find My app. Then:
° Tap Items at the bottom of the screen, then tap the name of the item you want to set an alert for.
° Below Notifications, tap Notify When Left Behind.
° Turn on Notify When Left Behind.
° If you want to add a Trusted Location, you can choose a suggested location, or tap New Location, select a location on the map, then tap Done.
° Tap Done.
(This how-to is based on my experiences and info on Apple’s support pages.)