Found a iPhone x on the street with a passcode and no one is retrieving it, is there a way I can use it for myself?

Found a iPhone x on the street with a passcode and no one is retrieving it, is there a way I can use it for myself?

Yes but you would be morally wrong. Take it to the police or a store near where you found it. If they turn on tracking you could face jail time.

Turn it in at a police station or a phone store.

Leave your name and other info so that you can be contacted
in the event that you can keep the phone.
Don't expect to be able to, though.

There's really no way you could use this phone or sell it. The owner has or will soon likely report the phone lost/stolen to their carrier who will block the IMEI from being activated anywhere else. Not to mention, they may even have Find My iPhone activated which could bring the owner AND/OR the police right to your house! Keeping a found smartphone nowadays is not worth it.

Turn it into your local police station or if you're able to see what carrier it is for, turn the phone into the appropriate carrier store. Keeping or selling the phone would not be morally right but also very illegal. Do the right thing and turn it in!

You can factory reset it.

No. Turn it into the police if that's the case.

Give it to the police…