Call / visit your carrier's customer service. Perhaps they can help you out. If not then you are out of luck.
Either late last year or early this year the FBI was investigating a crime and needed to unlock an Android phone for criminal evidence. Google would not unlock the phone without a court order. And last time I read anything about it, they were looking into fighting the court order believe it or not.
How do you expect us to know that and have you noticed this thread is six years old?
We cannot help with this question because it implies you don't own the phone concerned. We could tell you how to revert to factory settings which will kill off all the data whether they are yours or someone else's.
Please start a new thread of your own if you still need advice.