At leveling up you are allowed to simply choose two spells from the wizard list and declare that they are now in your spellbook. (PHB p.114: Learning Spells of 1st Level and Higher)
But there's more! You can build up your spellbook much quicker than that: see the sidebar "Your Spellbook" on p. 114 of the PHB. This describes the sort of process you mention, whereby you add to your spellbook by studying another wizards' copy, reading a scroll, or even through original research. (This, in my opinion, is the sine qua non of the wizard: the ability to build up such a large repertoire from which to prepare every day.)
See also this answer to Is it possible for a wizard to change the spells in her spellbook?
@DaleM's excellent answer:
You know four 1st-level spells of your choice from the bard spell list.
The Spells Known column of the Bard table shows when you learn more bard spells of your choice. Each of these spells must be of a
level for which you have spell slots, as shown on the table. For
instance, when you reach 3rd level in this class, you can learn one
new spell of 1st or 2nd level.
Additionally, when you gain a level in this class, you can choose one of the bard spells you know and replace it with another spell from
the bard spell list, which also must be of a level for which you have
But there's no more! Unlike the wizard, you can never know more spells
The wizard is unique among spell casters in being able to acquire more
spells by finding them. Some casters like Clerics have access to all
of the spells on the list when preparing them and others like Bards
have a limited and immutable list of spells that they know.