The issue is that Chamberlain/LiftMaster garage door openers made in the last 15ish years use an encrypted communication protocol over the wire, so a basic relay won’t work.
There’s a project called rat-ratgdo where the ratgdo has been reverse engineered and an open-source schematic has been produced. You can make your own based on that and use the ESPHome firmware for the ratgdo. For me it was just easier to buy the ratgdo.