Like most modern garage door openers, there is also a safety beam sensor, which emits an invisible beam at the opening of the garage door. If any beam interrupts the beam when the door is closed, it will automatically reverse it.
https://www.autodoormotor.com/industrial-door-motor/garage-door-opener/electric-garage-doors.html