Loose bearings like that are easy to service.
Loose bearings are easy to service.
Loose bearings like that are not easy to service

Clean it up with wd40 and see what it looks like.
If it's just dirty, and looks good when it's clean, wipe off all the wd40, regrease it and put it all back together.
If it's pitted or corroded and you cant clean it back to a perfect shine, you need a new headset.

