Hi Ethan, these (只 and 个) are called "measure words" (量词). In Mandarin, each noun is associated with one or more measure words that must be used when reporting a quantity of those nouns or when using demonstrative adjectives with them ("this" = 这, "that" = 那).
We have these in English - the difference is that they are only used with certain nouns in English, whereas in Mandarin, they must be used with every noun.
English examples:
a piece of furniture (we don't say: *a furniture)
a pair of pants (we don't say: *a pants)
a bar of chocolate (we don't typically say: *a chocolate)
Many nouns have special measure words, and different categories of words are often associated with different measure words. For example, you wrote "三只猫“ above - 只 is a measure word for animals; thus, it is used to report a quantity (3) of cats. Another example is 张 - this is used for flat things like paper: 三张纸 is "three pieces of paper" and 这张票 is "this ticket".
You also wrote "一个哥哥” - 个 is a general measure word that can be used for many different things (and you can often get away with using it if you don't know the "special" measure word for something). It is often used for people, like in your example. Another measure word for people is "位“ - this is used to indicate a measure of respect for the people you are referring to and is usually used in polite conversation; for example, if you go to a restaurant, the waiter will ask, ”几位?" To ask you how many people are in your party.
To summarize: in Mandarin, you must insert a measure word between the number and the noun when reporting quantities and between the demonstrative adjective and the noun when referring to a specific instance of that noun. For example:
三个人 three people
这个人 this person
那个人 that person
I hope that helps, and let me know if you have any questions!