Our numbers have a specific two-letter combination that tells us how the number sounds.
What do we call these special sounds?
It's an ordinal indicator:
In the case of 9th, the superscript shown is indeed called the 'ordinal indicator' as Matt Gutting has noted in his answer.
The addition of -th/ -eth relates to numbers 4 to 20 (and similarly,) and is a suffix to the cardinal number.
However, as in the second and third examples, the rd & st simply come from the right-end of the word for the ordinal number:
3rd: thi rd
301st: (three-hundred-) fir st (shouldn't that be 301 th ?, I'm not going there).
Of course, in general, we call all these superscripts 'ordinal indicators,' and "suffixes," 'ordinal suffixes.' (We can see that there's no suffix as such until we come to 4, as we have ordinal names.)
First, these abbreviations are not onomatopoeia.
In fact, your question is about writing rather than sounds.
In the written number 2nd, the letters nd are the superscript.
More generally, these letters form the ordinal indicator in english.
These are ordinal suffixes.