Hello. These are two separate things.
- You have added one student to a cohort. To add them to a course you need to enable the Cohort sync method and activate that in the course enrolment methods. That documentation link explains it
- OR - if you want a student to be automatically enrolled in all courses of a category then you need to enable Category enrolments Again the documentation link explains it.