Best plugin for hiding pages behind logins

Say I buy a theme from but I want access to certain pages to be locked until a user logs in and that access is only granted when they pay to subscribe.

What plugins and/or types of themes should I be searching for please?

I’m referring to Wordpress or something else if that’s better to achieve the above?