So, to reiterate, when it comes to when to use the "the", the only universal rule is this:
Some rules (such as the two you've given) might hold 95%+ of the time, but unfortunately there may be weird and arbitrary exceptions that you'll just have to learn.
Because a cursory look at the Wikipedia page for capitalization also reveals that it is not without its quirks.
For example:
planets and other celestial bodies: "Jupiter", "the Crab Nebula"; and "the Earth", "the Sun", or "the Moon" should be capitalized according to the International Astronomical Union based on its manual of style, but style guides may suggest differently.[19]
Is it the fact the way something is written almost has no bearing on how it's pronounced?
For me as someone who speaks english as a 2nd language this is definitely a big one
Though on the topic of the definite article, as a kid I found articles in general to be weird as my native language has none, so there were just these "untranslatable" words in front of some nouns for some reason