You should wear a helmet while riding a bike. What is the function of the modal verb should?

You should wear a helmet while riding a bike. What is the function of the modal verb should?

Explanation

The function of the modal verb "should" here is Advice.

It suggests what is the right or best thing to do for safety.

It expresses a recommendation.