I always get told off for saying
I wrote an email and told I should say
I have written an email. Why? When should you use these different tenses. Or point me towards a good cheat sheet.
You are entirely correct to say you wrote an email. It tells me that on one specific occasion you wrote an email. If you say you have written an email I might understand the same but could also understand that on some unspecified occasion you wrote an email.
Compare "I went to London. I wrote an email" and "I went to London. I have written an email". The first associates the writing with your being in London. The second tells us nothing about where you wrote your email.