Can cops search your phone?

right the point isnt that theyre gonna find incriminating evidence on my phone, if you are doing something illegal you will prob get caught and as well you should

but the fact that im not doing anything wrong and hypothetically some cop that feels like being an asshole gets to read all my personal conversations and see pictures of my gf or whatever…that is invasion of privacy

ive been searched with no probable cause before, some (not all) cops will stereotype and do what they feel like regardless