ZigBee aka IEEE 802.15.4 is pretty nice but range is somewhat limited due to the fact that it shares the same 2.4GHz band as WiFi and many other modern gadgets. Especially if you have a larger apartment, house or garden, you probably want to extend the range of your smart home gateway.
Also, your generic cc2531 Adapter has way less output power of approx. 14dBm / 25mW compared to your common WiFi network with up to 100mW. To make it even worse, the PCB antenna is an additional bottleneck for these signals. So, besides using different channels for WiFi and Zigbee it is desired to utilize this little energy as efficient as possible.
Adding an external antenna improves both - reception and transmission of your signal. Of course just adding a length of random wire might help a bit, but the correct way is to maintain line impedance of 50ohms so you can connect a matching external antenna for 2.4GHz.
Fortunatelly, the spacing of the PCB antenna just matches the dimensions of readily available PCB-mount SMA sockets. I have used these SMA sockets from AliExpress for around 0.17 US$ per piece. If you prefer, you can use such RP-SMA sockets of course as well. Just make sure your antenna has the right connector.
Make sure to buy/use the same of a kind! That is, either SMA socket and SMA antenna or RP-SMA socket and an antenna with a RP-SMA connector.
Using just a sharp knife or dremel, you have to cut and remove two small parts of the the traces as visible on the photo. Then you can solder the adapter to the board. To improve the ground connection of your socket, it is reasonable to also connect the now defunct rest of the antenna trace to ground. This gives proper grounding to your socket from both sides.
Adding just a little bit of superglue to the socket on the back of your board not only helps you keep the socket in place while you solder it but also gives additional stability.