Uhh.. Kirinke
Just to be clear here, you do know that the ability score upgrade every 4 lvl’s has nothing to do with your class?? You don’t get it every 4 class lvl’s, but character lvl.s.
And on the point of casting, your wis/int/cha score (depending on your class) limits the amount of spells you can cast a day, not the amount of spells you know.
For instance, a lvl. 1 Wizard with lets say an intelligence score of 13 knows 4 lvl. 0 spells and 2 lvl. 1 spells. Now if this same person had an intelligence score of 10 he would still know 4 lvl. 0 spells and 2 lvl. 1 spells, but could not cast the lvl. 1 spell doe to his intelligence.
To recap:
Your wis/int/cha score tells you how much arcane/holy power you have, something you need to cast the spells. But knowing a spell only involves knowing the words to mumble and the gestures to make (sometimes you need to throw around some fairy grindings two)