Non-left-orderable surgeries and generalized Baumslag–Solitar relators