HOW can a city or county even be ALLOWED to say that they will not follow the laws they don’t like that are still true and actual LAWS in america

HOW can a city or county even be ALLOWED to say that they will not follow the laws they don’t like that are still true and actual LAWS in america? Makes no sense to me. Can I declare certain laws no longer matter within my house boundaries? Can citizens say they don’t follow laws (didn’t work well for those in WY last year) if they don’t like them? Of course not. I don’t see how a city can say certain laws will not be followed. Either follow them or change the law, but if it is law, then it has to be followed. Ridiculous, and again part of the pulling apart of what used to be the United States of America.