Rom 13:1-2 MKJV
(1) Let every soul be subject to the higher authorities. For there is no authority but of God; the authorities that exist are ordained by God.
(2) So that the one resisting the authority resists the ordinance of God; and the ones who resist will receive judgment to themselves.
Sorry. Didn’t write that. Just quoting it.
Again, you need discernment. Not all of man's "rules" are to be obeyed. Man is wicked in his heart. But God is THE authority and is right in all His ways.