Thanks to the Fourth Amendment of the US Constitution and all the case law built upon it, police generally need a warrant to search your phone—and that includes just looking at the lock screen, a judge has ruled.
Generally, courts have held that law enforcement can compel you to use your body, such as your fingerprint (or your face), to unlock a phone but that they cannot compel you to share knowledge, such as a PIN. In this recent case, however, the FBI did not unlock the phone. Instead, they only looked at the phone’s lock screen for evidence.
Basically, the court ruled, the FBI pushing the button on the phone to activate the lock screen qualified as a search, regardless of the lock screen’s nature.
Source: Just turning your phone on qualifies as searching it, court rules | Ars Technica