Both - when installed in a device - can be transported in checked luggage though: https://www.iata.org/contentassets/05e6d8742b0047259bf3a700b...
IATA actually has a document specifically addressing tracking devices: https://www.iata.org/contentassets/05e6d8742b0047259bf3a700b...
My reading of that document indicates that an AirTag should be fine, as low-powered wireless communication is allowed (page 9, item 3).