Sender Policy Framework (SPF) is an email authentication method designed to detect forging sender addresses during the delivery of the email. SPF alone, though, is limited to detecting a forged sender claim in the envelope of the email, which is used when the mail gets bounced. Only in combination with DMARC can it be used to detect the forging of the visible sender in emails (email spoofing), a technique often used in phishing and email spam.
SPF allows the receiving mail server to check during mail delivery that a mail claiming to come from a specific domain is submitted by an IP address authorized by that domain's administrators. The list of authorized sending hosts and IP addresses for a domain is published in the DNS records for that domain.
After year 2022, gmail only accepts mails from the domain with SPF or DKIM configured.
Take my domain raidenmaild.com as example,
I will generate TXT Record for raidenmaild, its content string is
"v=spf1 mx a ip4:220.127.116.11/16 ip4:18.104.22.168 ip4:22.214.171.124/16 -all"
For more parameters information, please refer SPF WIKI
For SPF generator, please refer Mxtoolbox