community service

nouns

a service that is performed for the benefit of the public or its institutions
an unpaid service for the benefit of the public that is performed by lawbreakers as part (or all) of their sentence
is a type of (narrower)
an act of help or assistance
"he did them a service"