The following is an excerpt from https://www.jewfaq.org/alephbet.htm:
"Each letter in the Hebrew alphabet has a numerical value. These values can be used as numerals, as the Romans used some of their letters (I, V, X, L, C, D, M) as numerals. The table below shows each letter with its corresponding numerical value. Note that final letters have the same value as their non-final counterparts."
"The numerical value of a word is determined by adding up the values of each letter. The order of the letters is irrelevant to their value: the number "11" could be written as יא (Yod‑Alef), אי (Alef‑Yud), הו (Hay‑Vav), דדג (Dalet‑Dalet‑Gimel) or many other ways.
Ordinarily, numbers are written with the fewest possible letters and with the largest numeral first (that is, to the right). The number "11" would be written יא (Yod‑Alef); the number "12" would be יב (Yod‑Beit), the number "21" would be כא (Kaf‑Alef); the number "611" would be תריא (Tav‑Reish‑Yud‑Alef); etc. The only significant exception to this pattern is the numbers "15" and "16", which if rendered as "10+5" or "10+6" would be a name of God, so they are normally written טו (Tet‑Vav) (9+6) and טז (Tet‑Zayin) (9+7)."
(Rich, T.R., https://www.jewfaq.org/alephbet.htm)