Hi @Connor Johnston ,
Please take a reference of below code, it fetches the content type template and uploads it through rest API.
I have tested it in a Content editor web part and it works well in my SPO environment:
The reason why the file is empty is that the file format gets broken during the upload.
Another possible method:
<a href="ms-word:nft|u|https://abc.sharepoint.com/sites/testprivate/mytestdoclib/Forms/CTName/CAT.docx|s|https://abc.sharepoint.com/sites/testprivate/mytestdoclib"><h2>New Document</h2></a>
Best Regards,
Baker Kong
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.