I give dragons spells or spell-like abilities based off a few factors such as their species, environment, classes, personality, and ambitions. For example I have a Young White dragon NPC that is both the protector of a gnome village and the owner of a very popular tavern frequented by people who travel between the three major kingdoms of the northern part of the continent. She is technically half red dragon but doesn't show many sights of that side of her heritage. Her spell list has a mix of fire and ice spells (for her mixed heritage), spells like unseen servant, prestidigitation, animate objects, and calm emotions to help with maintaining her tavern, and a few illusion spells she has picked up from the gnomes she protects.