You may use plugin Restrict Content
Here is the article which will help you to setup. https://www.wpbeginner.com/wp-tutorials/how-to-restrict-content-to-registered-users-in-wordpress/