What a TXT record actually is
A TXT record is the most flexible record in DNS: it just holds a string of text attached to a hostname. DNS was built to turn names into addresses, but it turned out to be a convenient, globally-readable place to publish small facts about a domain — so over the years TXT records quietly became the backbone of email security and service verification.
Because anyone can read a domain's TXT records, they're perfect for two jobs: proving to the world what's true about your domain (which servers may send your mail), and proving to a specific service that you control the domain (a one-time verification token). Almost every TXT record you'll ever see is doing one of those two things.