It might depend on how you get the vaccine. I went to a mass vaccination clinic and was never asked to identify my race, but a family doctor presumably has that information on file and might report statistics to local health authorities?
I did. Almost all government adjacent forms ask you to specify your race. There's even a standard one when you get hired somewhere. There is almost always a 'decline' option, for whatever that is worth.