The iPhone is able to warn you if someone uses an AirTag to track you, but there is no such protection against Samsung SmartTags or Tile trackers.
AirGuard uses Bluetooth scans of your iPhone to find Samsung SmartTags and Tile trackers.
AirGuard identifies tiny-trackers, like Samsung SmartTags or Tiles, that are following you and forwarding your location to a third-party.
All this happens locally on your device and the private information, like location, tracker ids, etc will never leave your device.
If a tracker is detected at least 3 times at different locations (to make sure its not your neighbour) the app sends you a notification.