If you're in the US and a citizen, you do not have to divulge your password to the authorities or even a judge, per the 5th Amendment. However, they can force you to use your fingerprint or FaceID to unlock your phone.
If you think there's a chance the police might want to search your phone, be sure that you have a difficult pin pattern or password to unlock your phone at a minimum. Consider if bringing your phone is necessary. If you're going to a protest, do not bring your primary phone. Get a cheap burner or go without.
If you're not a citizen, you need to think about leaving. Seek asylum anywhere but here. Vacation in Canada. The US is no longer safe for foreigners.