first an important thing:
How do I turn down a verbally accepted offer?
I verbally (and via email) accepted an offer
You accepted the offer in writing. Today offers are accepted via website, email, scanned documents and snail mail.
was told background checks etc. would take two weeks, and when they
were done the contract would be issued.
Even if that offer was in writing, it was still an offer with conditions. You can fail a background check. You can complete a background check and if they are uncomfortable with some parts of it you can be rejected.
In the meantime I’ve been offered a position I prefer, not from a new
application but one I made well before I was offered this role.
It doesn't matter when you applied. I have seen offers take days, and others take many months to work through the process.
As long as the offer is contingent, you have an obligation to your self to keep looking, and applying, and interviewing.
when they were done the contract would be issued.
If the contingent contract didn't specify things like work location and pay, then those missing items could be used by you to reject the final offer letter after the background check is completed.
Since they’ve paid for background checks etc. do I have any
Any fees you would be responsible for would be specified in the original contract offer. It also could have been addressed in the background investigation forms you filled out and approved.
any thoughts on how others would phrase this would also be
very much appreciated - it feels incredibly awkward to say ‘I got a
better offer’ but that’s what it comes down to.
Make the email quick, simple and polite. There is no reason to provide details, because you aren't starting a negotiation.
The big question is when do you send it. The answer is as soon as you know that you will not be working for them. But when do you know?
If that new offer letter is just that, an offer letter, it is too early to tell the first company. If that offer has contingencies then you don't have a 100% solid job. You can fail their background check. Their check can be delayed and you could be waiting for months. There can be other contingencies: customer approval, getting a new contract, and so on.