there are 11 level 1 spells available to any wizard: Burning Hands, Charm Person, Comprehend Languages, Detect Magic, Identify, Mage Armor, Magic Missile, Shield, Silent Image, Sleep, Thunderwave
Of these 11, you as -a Level 1 wizard- had learned and copied in your magic tome 6 of them -not 5-: Burning Hands, Detect Magic, Mage Armor, Magic Missile, Shield, and Sleep.
You can only prepare spells that you have learned and copied, so your own pool of available spells was just the 6 above.
At level 1, your memory was good enough to retain 4 spells, the ones you prepared (I am leaving the cantrips out of this).
At level 1, you magical energy was only enough to cast 2 spells of the ones you had just prepared (the 2 "slots"), before needing rest.
Now you got some experience and have become a better wizard, a level 2 wizard.
while you can still only cast level 1 spells, you can now learn more of them, memorize more of them, and cast more of them.
somehow (this is the only bit that is thematically broken) you acquired 2 new spells that you copied into your Big Book of Magic: since you are still limited to level1 spells, you can pick 2 new spells from the 5 (out of the initial 11) than you hadn't learned before: Charm Person, Comprehend Languages, Identify, Silent Image, Thunderwave.
The 2 you pick become a permanent part of your magic arsenal, since they are written in your book. you can prepare them like the other spells.
As a level 2 wizard, your ability to retain the wording/gestures of the spells have improved, so now you can memorize 5 spells (out of 8) for a day.
As a level 2 wizard, your magical energy/efficiency to cast spells has improved, so now you can cast 3 of the spells you prepared (3 slots), before needing rest