I enjoyed reading this prompt, thx. All good advice up above.
Re: townsfolk having trouble choosing a gift for the dragon, I would suggest adding some structure. It’s a bit unclear and I might be misinterpreting but rather than have the townsfolk be simply uncertain, I would invent 2-3 “factions” in town. The groups disagree as to the best solution, but each have their own solid idea (and somehow need the PCs support… as NotAYakk says, Why are the PCs involved?). This creates a little gentle conflict/drama, but it also gives the players a clear decision point with 2-3 viable answers: who do they help/support? It’s exciting when the PCs come up with their own ideas full stop, but on their 2nd session in a new town, it’s unlikely they’ll have the resources, and without any structure it can frustrate players to trip around fishing for a “correct” answer.
Each faction can be quickly represented by one (or 2) signature NPC, and this also lets you flesh out the town bit more and insert the PCs into it politically. E.g. maybe the mayor’s team has the most clout but their gift idea is pretty uninspired, whereas the head of the mariner’s guild is clearly making a power play (but it’s a great gift). Someone else has had a wonderful idea, but it’s been discounted because that ruby circlet is buried in the old ruined tower, and who ever would be able to retrieve it?
Different levels of risk/reward, and visible trade-offs to help the players weigh their options and keep them in the drivers’ seat. No more than 2-3 clear options to save your sanity. (And of course that doesn’t prevent the PCs from coming up w something better! it just gives everyone a safety net.)
Re: the dragon’s hoard, I love toucanbuzz’s idea of an extraplanar vault. But I find things like that are more fun if the players get to experience them too, so I’d probably keep at least some of the treasure visible/accessible, with the hint that there’s even more tucked away. IF you think it’s likely the rogue will try to steal something, then I’d roll one magic item in the DMG as a suitable temptation/reward but I wouldn’t do extra prep you won’t likely use (the same charts should give you a rough idea of the hoard’s size and you can easily handwave big piles of gold and jewels, ancient statues, encrusted bowls/goblets, etc etc, since the PCs are unlikely to be able to examine/count everything!). I’d also telegraph the risk involved in stealing from a 500 year old dragon as a brand new rogue, ha! Nobody likes to be stolen from, even (especially?) all-powerful good-aligned dragons, and you can emphasize the size of the dragon, their prickly sense of honour, etc. The risks from getting caught should be clear and at least equal to the potential reward: not necessarily combat/death (although it’s possible) but alienating a potential ally (and the townsfolk??) is a powerful in-universe consequence. In my group the thief is cautious. She would know it’s a very bad idea and would likely keep her hands in her pockets, so to save myself time I likely wouldn’t have prepped this. But if temptation got the better of her, then the players are driving the game and that’s when it comes alive. So kudos for not ruling out the possibility! Good DMing. In my case since I wouldn’t have decided on all the treasure beforehand I’d just roll on the spot to see what she found. That’s ok too!