If you want to change the law, you contact politicians, sign petitions, protest in a way that doesn’t prevent emergency vehicles or public transport from reaching their destinations, and you vote during election. If that isn’t enough, you run for office. Doing illegal stuff isn’t justified at all.
Of course what you describe is a way of doing things. What you say and what I said are not exclusionary. People can have both legal and illegal approaches on the same topic. Sometimes it is justifiable on moral grounds to break the law, and many countries recognize that need in their constitutions.
That’s appropriate when you’re trying to change certain things, not everything. When you’re trying to get civil rights or anything else that the higher ruling class doesn’t want you to have, it can and usually does necessitate illegal and violent protesting and uprising.