Il master mi ha passato questo
This is a surprisingly common question. The answer is, RAW, wizards do not gain their two free spells per level, because while those spells become "spells they know" they aren't "spells known" a la the "spells known" table. HOWEVER, almost every DM/campaign ever lets this technicality slide, granting wizard prestiges their ~2 spells per level.
The reason it works this way is because Wizards do not gain the spells at each level up through their spellcasting class feature; it comes from their "Spellbooks" class feature, which specifies Wizard levels only. Prestige Classes do not advance the spellbooks class feature, so by RAW, wizards are not eligible for additional spells on prestige-level up. Again though, most DMs just waive that.
È attendibile?