The first time I learned about the idea of community service was in a movie and it was mostly done by offenders of the law, it was a form of punishment for offenders and also a way to help the community in various ways to strengthen the community and build the spirit of being helpful to the community, teaching values.
I also notice that community service could involve a lot of different activities like cleaning public spaces, visiting orphanages, helping elderly people, supporting people with disabilities, planting trees, or taking part in other minor actions that benefit society. But I've never seen it as a requirement to non offenders before.
Although, I think making community service part of the requirements for secondary school graduation could be a good idea. But the approach matters because the goal should not just be to make students complete a task so they can graduate. It should be about helping them understand the importance of giving and caring.

Making community service for secondary schools as requirement for graduate have good and bad sides. On the positive side, it could help students develop a sense of responsibility early encouraging them to be more involved in their communities instead of growing up with the mindset that everything should be about them.
But on the negative side is that, not all students may be able to participate in it as there are some with disabilities, health challenges, or responsibilities at home that make participation difficult. Some students may only participate because they are afraid of losing their graduation instead of actually understanding the purpose.
Still, the advantages of having a community service added to secondary school curriculum weighs more as the benefits are more and what we need more of in our world today. I think the best approach is to introduce community service gradually, starting from the senior secondary school level. Maybe in their final two years to go.
Schools should also give students different activities to choose from based on their interests, abilities, and circumstances. Teachers should supervise these activities and ensure students are actually participating. And students who miss their required hours for genuine reasons should be given another opportunity to complete them.
The only similar to community service activity I've witnessed as a graduate in my country is, the Nigerian service program where we spend a year in a different state to serve a community and we call it CDS - Community Development Service. Many are not ready because it was not done before. That can change with community service.
I support making community service part of secondary school education, not just lessons. It could help raise them understand that life is not only about personal successes but the positive impact they can have on others, provided the programme is properly planned and they are given fair opportunities to participate.
And perhaps, one of the best lessons a student can take away from school is the understanding that being educated should also mean knowing how to make life better for someone else.
Image used is AI generated.
Community service is good and useful for our societies. Adding it to school curriculum have the good and bad sides you you mentioned. A good point you did mention though is it being introduced early so that students understand it, and it doesn't become more of a forceful thing but a responsibility.
An individual can never live in isolation from society. Therefore, it is essential that our education system be designed to teach individuals to work for the well-being of society.