I've my SharePoint site
https://xxxx.com. It contains multiple pages and subsite and so on.
Is there a way to restrict the access of a specific group, so they can only view the main page aka
You could break the permission inheritance on the pages library and grant permissions to that group only to view the main page.
refer below article for detailed steps on breaking permission inheritance.