Great question :). Short answer: both are correct. Long answer: the origin of this word is from the Aramaic language. In Aramaic א in the end of the word marks the definite article. Many words in Hebrew came from Aramaic with this א suffix and mistakenly though to be feminine (indefinite) words. A few years ago the Academy of the Hebrew Language decided that nouns in Hebrew will never and with א. All of the nouns that already ends with א, could be written both with א or ה.
In English, write¹ would be used in a general sense or if you are narrating events (like if you are telling a story).
I write the password in my notebook, so I don't forget it.
I write in my diary in the morning.
If you are currently writing, you use "writing".
¹ this is because of the verb tense. I hope I don't mess this up because I'm terrible with grammar terms, but I think it's "present continuous". Verb + ing, for actions happening now.
I am cooking, I am writing, I am running.
"Simple present" verb tense = in a general sense, something you do in general.
I cook. I write. I run.
tistakel, not testicle https://www.pealim.com/search/?from-nav=1&q=%D7%AA%D7%A1%D7%AA%D7%9B%D7%9C
The root ר-ש-מ has several appropriate meanings, and this isn't one of them.
Originally, ר-ש-מ referred to making markings on paper with things other than ink, such as charcoal or pencil, specifically not writing. Another meaning that is more modern is from the word רשימה (list), so it's used for signing up for something, or adding to a list, or registering (as in registered mail).
For composing a letter or a book, and for writing things down on paper or computer, use כ-ת-ב