CAT5 cable will be fine.
Only thing to watch is that it is like some Telephone cable that I have come across which was on a drum marked "CCS" turned out to be Copper Covered Steel. Not good. Test with a magnet, proper CAT5 being copper will not be attracted by a magnet.
BT would use CW1308 cable. https://www.ebay.co.uk/itm/5M-WHITE-TELEPHONE-CABLE-...
This seller is offering copper cable, but a quick search produced CCS which is not so good.
My advise to get a connection through a wall, is to use a RJ11 socket. Something like:
And a RJ to RJ cable of whatever length you need between that new socket and the MODEM.
Andrews & Arnold Home::1 FTTC DrayTek Vigor 2762ac Cisco SPA112 and HUAWEI E5776 with O2 Data SIM