If the setup animation disappeared, press the side button or Sleep/Wake button on your iPhone to put your device to sleep. Then wake and unlock your iPhone. Wait up to 15 seconds, and the animation should reappear.
If you have multiple AirTags to set up, make sure that only one is near your device at one time.
If your AirTag still won't connect to your device, reset your AirTag.
AirTag, the battery cover, and the battery might present a choking hazard or cause other injury to small children. Keep these items away from small children