An organ like a wing in birds are an advantage to an organism

An organ like a wing in birds are an advantage to an organism. Did they appear in different stages or were formed due to a single sudden change in them.

Feathers in dinosaur were long and they could . not fly using feathers. It gave them protection from cold weather and warmth. Birds seem to have later adapted the feathers to flight.