Groups provides a built-in access control that allows to restrict access to posts, pages, and custom content types to specific groups and users only.
See how to control access to:
You can also control access to content by groups or by capabilities using the shortcodes.