Wizards can be played by any race, but some races work better than others. For example, a Dragonborn elf would not be a good choice. The following is a list of the top 3 best races for wizard gameplay.
A good race for wizards is the gnome race. Gnomes get a +2 intelligence modifier, which makes them very good at learning spells, and their Gnomish Cunning feature makes them good at saving throws against spells. Specifically, if you play a forest gnome, you will get +1 Dext and a minor illusion, and if you play a rock gnome, you will get +1 Constitution and the Artificer's Lore feature, which allows you to gain higher proficiency on history checks of magical/alchemical objects.
Elves are also useful races for wizard gameplay. They get +2 Dex, which improves their AC greatly. That's always a help to wizards, because they tend to have low HP in general. Also, they are proficient in the skill of Perception, which is always useful. Plus, if you play a high elf, you get an extra cantrip and +1 intelligence, and intelligence is essential for wizards.
Believe it or not, using human variants can make quite the formidable wizard. The get +1 for 2 abilities, so to make a good wizard, you'll want to use one bonus on itelligence and one bonus on Dex or Con. At level one, they also get an extra skill and an extra feat. To make a good wizard, put the extra skill into any intelligence based skill. Also, put the extra feat into elemental adept or spell sniper.