Ooooh, good question. The answer, of course, is “it depends.”
First, it depends on the accepted styles of expression and the tropes of your genre. Pirates can be expected to say “arrh” in any proper pirate story (historical fiction, fantasy, steampunk, SF-futuristic pirates, it almost doesn’t matter). Once your pirate(s) have broken the ice, other characters can follow suit and you can spell out their onomatopoeia rather than capturing it in a noun phrase or predicate phrase.
Second, consider the mood or atmosphere of the story you’re writing. Would writing "Ahhhhh!" fit with the atmosphere you're trying to create? In an early-reader children's book, probably yes. But a regency romance like Sense and Sensibility would not use spelled-out onomatopoeia like you’re describing, except for mild genre-accepted stuff like “oh!” or “hmm.” Same with grim stuff like Edgar Allan Poe or HP Lovecraft. Spelling out the scream spoils the mood.
(This is similar to genre sensitivity but it has to do with your intent as an author, not the demands of the genre. So if you're claiming Agatha Christie as a comp and Dame Agatha wouldn’t do it, don’t you do it either.)
Third, does it fit your own “author voice”? Once you understand the rules, guidelines, tropes, and expectations, you can break them intentionally …as long as you do so in a way that successfully achieves a certain goal. For instance, the old middle-grade fiction series The Time Warp Trio intentionally employed a super-casual narrative voice (with plenty of “Aaaaaugh! Blaagha-blah, yecch!”) in tightly-wound social settings like Edwardian England and ancient Egypt for humorous effect, and it worked brilliantly.
Finally, if you must spell out your onomatopoeia rather than describe it (you can tell I lean toward choosing evocative words, not spelled-out “sound effects”), do so phonetically as much as possible. For instance, your example, “Ahhhhh,” reads more like a satisfied sigh than a scream. You’ve only got one vowel there, followed by five quiet letters emphasizing the quiet susurration not the loud vocal. A scream might be better rendered with more vowels and fewer quiet consonants: “Aaaaah!” All I did there was swap the numbers of the two letters: this time it’s five vowels and a single quiet consonant, and yet it reads completely differently and could be interpreted as a scream.
That’s the drawback of spelling out the groans, cries, and ululations of your characters: creative onomatopoeia can be very easily mispronounced and misunderstood by the reader, even when you are very careful with the phonemes. When that happens, the expression can seem ridiculous when you mean it to be serious, or it can simply fail to make sense (like your satisfied-scream example). One of the brilliant things about The Time Warp Trio was how the author got his frequent onomatopoeia just right, often spelling out creative and unique sounds that I had never before seen expressed phonetically in print. It was hilariously perfect: you knew just what sort of sound the author was evoking.
And when he couldn’t get it exactly right, he switched to the usual noun phrases and predicate phrases: “a howl of despair” and “the crowd alternately cheered with delight and hooted with derision.”
So, the answer really is “it depends.” Understand what’s at stake and choose your onomatopoeia policy wisely, story by story.
And when you do spell out vocalizations or other onomatopoeia, craft it carefully and test it by having someone unfamiliar with your story read the “word” aloud out of context, and then read aloud the passage in which it appears (read the “word” in context).
If they pronounce it the same both times, and pronounce it pretty much the way you intended it to sound, you’re doing well!
(Thanks for letting me use this photo, Rakesh!)