Hello martinh2003x,
I haven't done this but detective work looks like there are regular trains between Gallipoli and Nardo Centrale station which is outside Nardo proper - 29 minutes and 1.6e on Trenitalia.
Unfortunately the 5 minute transport to the city seems to run infrequently so you can book a ticket to Nardo Citta but that makes you wait a long time for the 5 minute ride. And judging from the look of Nardo Centrale station on Google maps there won't be cabs waiting. It does look like certain trains are better - 9:07am connects to the bus in 5 minutes but other trains are timed less well.
Trenitalia also runs a bus from Gallipoli to Nardo Citta (BUS) that seems to run in the afternoons.
https://www.fseonline.it/s/?language=it
This also seems to connect to Porto Cesareo but only once a day so your options are limited.
It looks like the #1 Chiffi Bus does this route but as a once a day thing and is very early in Gallipoli and may not work for you.
http://www.chiffibus.it/Linea_Gallipoli-Bari_2019.pdf
I can't say I've found everything but the operations do seem to be limited in winter with buses running once a day in each direction or not connecting well.
Hoping this helps a little and you find what you need,
=Tod