This is from the PHB, read the entire source and quit cherry picking the piece you want to emphasize.DH - Dweomerheart wrote: ↑Thu Apr 22, 2021 2:10 pmHere from chapter 7 Dungeon master guide: acquisition of spells: Copying from Spell Books
The second way to acquire new spells is to copy them from the spell books of other wizards. A character can copy from other player characters (if they will allow it), pay NPC wizards for the privilege (see Chapter 12 : NPCs), or take them from captured spell books. When copying spells, a character must roll to see if the character can learn the spell. No character can copy without magical aid of a spell of a level he cannot cast.
"When your character attains a new level, he may or may not receive new spells. This is up to your DM. He may allow your character to return to his mentor (provided he departed on good terms!) and add a few spells to his book. It may be possible for your character to copy spells from the spell book of another player character (with his permission, of course). Or he may have to wait until he can find a spell book with new spells. How he gets his spells is one of the things your DM decides."
Key line is last one. Which leads back to what we have all been telling you and has already been listed i. The Wizard rules thread for six+ campaigns now.
Level up. Use a domain action. Use a library as a free action.
That's it.