You can enable the Prerequisites addon in the STM LMS ▸ LMS Settings ▸ Addons section of the WordPress dashboard menu.

After, you need to edit a needed course and set up prerequisites’ settings of a course in the Course Prerequisites section. In the Course Prerequisites section, you can add courses that should be completed before purchasing this course.