I have a question regarding the job of law enforcement in the United States. Would it be halal to be a police officer in Michigan? Or would this be considered pledging allegiance to the kuffar (america)

As long as what you do is in line with Islamic values, you don’t oppress anyone, and you truly try to bring actual justice to society, then it would be permissible