Looking at the contents of someone else’s phone without their knowledge

Is looking into the contents of my friend’s phone without his knowledge considered as spying on Muslims and their private issues, bearing in mind he has gave me permission to call someone with it?

If your friend gave you permission to call someone, then you should restrict to just that use and not do more than that by looking into other contents like messages and things without his permission, because doing so requires further permission. If you do end up looking at other things in the phone then this is like eavesdropping, and there is a severe warning against doing this.