When you decide to adopt a Latin script in a language that has way more phonemes that this writing system supports, you have to improvise a lot. Czechs had to come up with digraphs (one of them is literally in their name!), but eventually replaced a few of them with single letters modified with diacritics.
And how did that happen? Well, a reformer called Jan Hus got really inspired by Hebrew texts, and not just with the content, but with the writing system itself. In Hebrew, the same letter can have a dot in different places, denoting different phonemes. Czech orthography went further, and instead of dots they started using acute accent ´, overring ˚ and little hook ˇ.
Poles considered this orthography anti-catholic and used the Old Czech system (that’s why Polish language still has digraphs like cz), but they also had something that Czechs couldn’t provide letters for. They had (and still have) nasal vowels. And what do you do when the script you’re using doesn’t support certain phonemes? You look into a writing system that does have letters for them. You know, for inspiration. Just like Jan Hus. And luckily, their Orthodox neighbours did use nasal vowels.