Certain courses can be available for “guests” so they can be able to see the contents of the course and have a look around it, allowing guest access is usually done for demo purposes.
To turn on Guest access for a course, follow the steps below:
Step 1: Enter the course you want to enable guest access to
Step 2: Click the “Participants" from the course menu bar.
Step 3: Choose Enrolment methods from the Enrolled Users drop-down list.
Step 4: Click 'Add method' below and choose Guest access from the drop-down list.
Step 5: Enter desired settings, then click 'Add method'.

This setting determines whether a user can access the course as a guest, without being required to enrol.
Guest users will now be able to see the content of the course.