
It's essential to help kids develop a sense of autonmony and independance. Their rights are limited enough, and providing them some level of control goes long way.
That being said, we as parents are responsible to know what is going on in their lives.
"Can I check their phone?"
Hell yes...just because of predators and cyberbullying if nothing else. And they have absoulute 0 privacy with anything they are doing on line for the same reason. Make this a known condition when you first get them a phone or give them screentime,
"Can they deny us entry into their room?"
Yes, but not for long.
If your kid insists on a lock, as most teens will, then let them know that you have a spare key.
There should always be a "knock first" rule. (And not just as a complimentary warning before you come in.)
Give the child the athourity to make you wait until they say they are ready.
Let them know that if they do not answer, or outright refuse, you are coming in, ready or not.
Let them know that their room will be inspected on an agreed up schedule. (Trust me, many teens will let their rooms become very unhealthy if left to do so.)
Summarry
The key is to establish these conditions of privacy right from the biggining, rather than all of a sudden springing it on them after they've already built up a differnt expectation.