What would cause a nail to be rusted like this in the drywall ceiling of a new home (built 2019)? Is there anything specific I should request our builder to repair other than just painting over the nail again?
Short answer is that it's probably fine. Just set it, patch, texture and paint.
More nuanced answer depends on where in the house it's in. If it's a bathroom or other high humidity zone, don't worry about it. (Generally, sheetrock is screwed these days, but it's common enough practice to tack sheets in place with a few nails. Nails aren't particularly rust-resistant.)
If it's below a bathroom or a roof that you might have cause to be suspicious about, then a bit of exploration might be in order. Look for stains nearby; touch the ceiling to see if you can find anything spongy or cooler than its surroundings.