This subject has come up repeatedly in the US this year: first with the lockdowns to control the spread of Covid-19 and now the curfews and police actions against protestors against police brutality.
As other answers have mentioned, the Fourteenth Amendment means that laws of all governments in the US must respect the constitutional rights of all citizens.
However, no constitutional right is an absolute, existing in isolation. The constitutional rights of different individuals can come into conflict, and have to be sorted out by our legal system. For example, the 1st amendment protects freedom of speech. Suppose I hire a sound truck and come into your neighborhood at 3am and begin urging everyone to vote for the candidate I support. You call the police and complain that I'm violating local noise ordinances. The police come, arrest me for violating the noise ordinance, and I'm tried and convicted. I appeal on the grounds that the local noise ordinance is a violation of my 1st amendment right to speech. The city's argument is that there is a compelling state interest in limiting sources of noise during certain hours of the day, so that other citizens can go about their business (including getting a night's sleep). The Supreme Court considers the arguments and rules that restrictions on time, place, and manner of speech may be imposed if they are content neutral, as narrow as possible, and advance a vital government interest.
Similarly, in a pandemic, or a civil disturbance, which arguably presents a life threatening situation, cities and state can argue that the immediate threat to human life and property justifies restrictions on the free movement of citizens. They can be challenged in the courts and the local government will have to convince the court that the restrictions were reasonable, as narrow as possible, and not applied in an inequitable way.
Of course this doesn't prevent governments from trying to impose restrictions that are unreasonable, overly broad, and targeted at specific groups. This has to be addressed in the courts after the fact, and at the ballot box.