How to build an SPF record
List every service that sends mail as your domain: your mailbox provider, your marketing platform, your help desk, your billing system. Each one publishes an include value in its documentation. Add any servers of your own by IP address, pick a policy, and publish the result as one TXT record at the root of your domain.
The counter above shows the real DNS lookup cost of each vendor, measured by walking its include. Stay at 10 or under. If you can't, move a sender to a subdomain such as mail.example.com with its own SPF record.
Rules this generator follows
It never produces +all or ptr. It puts cheap terms first (ip4 and ip6 cost no lookups), then includes, then a and mx, then all. If the record is longer than 255 characters it shows the value split into quoted strings, which is how DNS stores long TXT records.