With a TXT record, you can provide additional information about your domain and specify instructions for servers that manage emails.
An SPF Record is a type of TXT Record. The SPF (Sender Policy Framework) is a method that helps to prevent the falsification of the sender address of an email (spoofing). This prevents, for example, spammers from bypassing spam filters by making messages appear as if they came from trusted sources. This SPF record defines the IP addresses and servers that can be used to send an email using your domain. However, the SPF record does not prevent you from receiving spam.