Is it okay to spy on someone’s phone for example my brother’s because of the fear that he is not doing something right and is indulged in wrong things.

Spying in Islam is not permissible. One should be straightforward and advise. In some instances guardians and parents may be allowed to prevent a greater harm.