Hello Jaenri and thanks for asking this question it is indeed very interesting.
When we start learning how to read in Kindergarten and primary school, our textbooks have vowels on letters in order for us to learn how to pronounce them. We also learn how to read all the combinations of sounds (consonants with all short and long vowels) with the help of a chart. After a while when we master reading, the textbooks no longer have vowels.
However, even as adults we would still find texts which will have vowels in order to help us differentiate the words in instances where
two or more words share the same consonants. These will be written in the same way and the vowels male it easy for us to read.
Here are some examples :
عَلَمْ = flag
عَلِمَ = he knew
ْ عِلْم = science
You are raising an interesting question related to the domain of reading acquisition : How do we learn to interpret what we read not as separate entities of words but in relation to the context in which the text is written.