Good day
Is it possible to restrict an entire course (not just the lessons and quizzes inside the course) based on cohort?
Thank you
Sounds like you want to use the "Cohort sync" enrolment plugin - https://docs.moodle.org/en/Cohort_sync
This will enrol/unenrol users from a particular course, based on their cohort membership (although it does not stop users from enrolling on the course via any other enrolment methods that have been enabled for that course - if you only want cohort members on the course, you should make sure no other enrolment methods are available for that course).
Not sure what you are asking - if you don't want the cohort to access the course, then don't enroll it in the course...