I read in my textbook that to make the O sound long, you have to add a u after it. So when I was unlocking new kanji and came across the kanji for ice ‘koori’, I was confused that it had an O rather than a U and was wondering why that was. Can anybody help me with this?
This thread has some answers about that, but the short answer is: etymology. Different derivations, and the language only being standardized somewhat recently (post WWII) means that there will be some exceptions to general rules.
Specifically for こおり, it used to be こほり, and has been standardized to こおり now instead.
This is a very, very rough guide, and it’s not something you need to know in order to succeed in Japanese, but generally, if you’re looking at a long O sound, you’re much more likely to see it written as ‘ou’ (I’m using rōmaji because hiragana would force me to pick a consonant) if the reading is an on’yomi. If the reading is a kun’yomi, then you’re more likely to see it written as ‘oo’. There are exceptions to this general rule (e.g. 扇（おうぎ）is a kun’yomi), but it works pretty well most of the time.
How can you tell on’yomi and kun’yomi apart? Uh… on’yomi tend to be shorter (1-2 full-sized kana per kanji) and are more likely to end with long vowel sounds or U kana like く and つ. But once again, this is a matter of etymology (on’yomi are usually based on historical Chinese readings), and it’s something you get a feel for with experience. (I can only tell them apart fairly easily because I’m a Chinese speaker, but even then, I had to get used to the differences between Mandarin and Japanese pronunciation.)
Ultimately, this stuff is basically language history trivia. It’s good to know, and will probably help you when you start using resources written in Japanese to learn more about Japanese, but if you’re just starting out, it’s really not that important. Remembering whether you need a long or short vowel, and figuring out how you’ll remember how each reading is written, are probably better uses of your time.