Sophos XG firewalls, at the time of writing, do not offer sufficient flexibility for configuring BGP via the web panel (namely, you cannot even set local preference or modify AS paths) and the official documentation for the CLI is scarce at best. Luckily, since 19.5 MR1, the underlying routing engine is the free and open source Free Range Routing/FRRouting, which has plenty of documentation. As of now, the version included with the 19.5 MR1 firmware is the 8.1 stable - here are the docs.
You can enter the CLI configuration via SSH or via the web based terminal, by logging in, selecting Routing Configuration, then Configure Unicast Routing, then BGP Configuration.
Here are some sanitized extracts from a config i did.
Don't forget to "write memory" to save the configuration to disk. This is also necessary to show changes in the web panel.