Re: "While writing an email I opened an email I had received and the draft went missing how do I recover the draft?"
The eMail draft may still be there on the desktop, but hidden behind the other Mail window you opened.
(Generally, it would have been saved to a drafts folder as well.)
__________________________________________________________________________________________
Re: "I've had trouble with drafts in the past with the biggest problem being that drafts says
that I have seven drafts and open it to have nothing there probably because they were deleted".
If you haven't already: wondering if updating to Sonoma 14.1 may help.
or
Apple support's article for Sonoma has a few tips:
Save draft emails in Mail on Mac - Apple Support
Sometimes there are more than 1 drafts folder in the sidebar, besides "All Drafts"::
eg: if you have more than one eMail account (like Yahoo and GMail or etc.)
you may need to look for a separate drafts folder for each account.