There are ways you should act and ways you should not act with cops. The smartest thing would be to comply with their reasonable and legal demands, but not give compliance to things you are not legally obligated to do. For example, you should not give cops permission into your house without a legal warrant, nor should you allow them to search your vehicle without a warrant. Doing so would create more trouble than needed. You should comply with police, but also know you have rights.
What you should not do is openly trying to piss off the cops, and not comply with their demands which you are legally obligated to. In other words, act like a normal respectful human. Don’t try to run or resist. Don’t do anything sudden that make them think you are armed or a threat. It’s a very simple concept that many fail to understand.