Some background for those who aren't familiar: "Romanization" refers to converting Japanese sounds into the Latin (Roman) alphabet. In Japanese, these sounds are written with phonetic characters called kana. (There are two types of kana; I'm only going to talk about hiragana here.) Each kana represents either a vowel or a consonant followed by a vowel. For example: あ (a), こ (ko), ね (ne). Aside from a terminating n/m sound (ん), there are no characters for standalone consonants. There are five vowels (a i u e o).
The kana are usually written in a table where each row is a vowel and each column is a consonant, like on Wikipedia[1]. Most columns of the table have five characters, each representing the same consonant combined with one of the vowels. For example: か/き/く/け/こ ka/ki/ku/ke/ko, ま/み/む/め/も ma/mi/mu/me/mo. Some columns have "missing" sounds (や/ゆ/よ ya/yu/yo); but what's important for our purposes is that some columns have irregular sounds: さ/し/す/せ/そ sa/shi/su/se/so and た/ち/つ/て/と ta/chi/tsu/te/to. There are no si, ti, or tu sounds in standard Japanese; they have shi, chi, and tsu instead.
Using diacritic markings gets you more consonants. Most of these are made by adding a couple tick marks to the corner of the character, which makes the consonant voiced instead of unvoiced. For example: か ka -> が ga, と to -> ど do, ひ hi -> び bi. But the irregular sounds stay irregular: し shi -> じ ji instead of zi, ち chi -> ぢ ji (again) instead of di, and つ tsu -> づ zu instead of du. (す su -> ず zu gives the same sound but in a regular way.)
You can also combine i-vowel characters with y-consonant characters to get sounds with consonant clusters: き ki + や ya = きゃ kya, み mi + よ yo = みょ myo, etc. The irregular sounds remain irregular: し shi + ゆ yu = しゅ shu (instead of syu), ち chi + や ya = ちゃ cha (instead of tya), じ ji + よ yo = じょ jo (instead of zyo). There's a Reddit post with a nice table showing all the available sounds[2].
Now the problem for romanization is this: Should the romanization reflect the irregular sounds in the spoken language? Or should it reflect the regular groupings of the kana characters? づ and ず might both be pronounced "zu", but they come from different linguistic origins, just as "bear" and "bare" do in English. The Hepburn system uses spellings that match the sounds, while the current standard (Kunrei-shiki) uses spellings that match the kana grouping: し si (instead of shi), ち ti (instead of chi), じ zi (instead of ji), つ tu (instead of tsu), じょ syo (instead of sho), etc.
The Hepburn system tells you how to pronounce the word[3] at the cost of being a lossy encoding. For anyone familiar with the Latin alphabet, that's almost always the better choice, and it's nearly universal in the Western world. Kunrei-shiki does better reflect the underlying structure of the Japanese language and its native writing system, which is probably why the Japanese government preferred it. But anyone who wants to learn the language is going to learn the kana almost immediately (it's just a few hours with flash cards), so IMHO that's pretty small advantage.
I deliberately didn't talk about long vowels, glottal stops, the differences between hiragana and katakana, different pronunciations of ん (n), or how to handle ん (n) followed by a vowel, but if you're curious about Japanese romanization those topics may also be of interest to you. I can try to explain more if anyone's curious.
[1] https://en.wikipedia.org/wiki/File:Kana_chart_1.png [2] https://www.reddit.com/r/LearnJapanese/comments/awzw04/kana_... [3] Most of the consonants are the same as English or close enough and are trivial to write in the Latin alphabet. The big exception is ら/り/る/れ/ろ, normally written ra/ri/ru/re/ro but it's not really the English r sound. See: https://en.wikipedia.org/wiki/Voiced_dental_and_alveolar_tap...
Should the romanization reflect the irregular sounds in the spoken language? Or should it reflect the regular groupings of the kana characters?
OR....
Should it reflect how one would type it on a keyboard in order to get the correct Japanese characters (ひらがな、カタカナ、漢字)?