I'm more familiar with North Wales than South Wales.
Llandudno/Conwy area springs to mind as being a possible. They are a short distance apart and acccessible by train.
Llandudno is a Victorian sea side town and there is the Victorian tramway up the
Great Orme. Don't miss the Bronze Age Copper Mines there they are mindblowing, especially the short underground trip. There is also a lot of very easy
walking on the top of the Great Orme too. The Vintage bus trip around the Great Orme along the Marine Drive is worth doing.
Ideas for walks around Llandudno
here.
Conwy is a walled town with one of the best ruined castles in Wales (see #3 here). Plas Mawr, an Elizabethan Town House is also worth visiting.
From both, you can get a bus to Beaumaris (on Anglesey - see #5
here) which has another very gooid ruined castle complete with a moat. The Goal ius also worth doing.
Yo can also get a bus to Caernarfon, another walled town with ruined castle (#6
here) which was used for the investiture of the Prince of Wales.
You can use either the Conwy Valley rail line of bus up the Conwy Valley to Betws-y Coed which has a lot of good walks. Ideas
here.
Nnother suggestion wotuld be
Criccieth again with a ruined Castle. This has good bus connections to Porthmadog with two narrow steam heritage railways. The
Ffestiniog Railway goes from Harbour Station in Porthmagog to the slate town of Blaenau Ffestiniog. Get off at Tan y Bwlch the mid way station which has a cafe and is also a good place for walks through the surrounding woodlands.
Map here.
Either get off the train at Minfford or catch a bus from Porthmadog and visit
Portmeirion. This is described as an Italianate village by a very quirky architect who wanted to show how an area like this could be developed without spoiling its natural beauty. It is completely different to anywhere else in Wales and is a visula delight. It is a wonderful setting with miles of footpaths through the woodland, past lakes and follies
Harbour station in Porthmadog is also the terminus for the
Welsh Highland Railway which runs along the flanks of Snowden to Caernarfon. Get off at Beddgelert (nice place with cafes and ice cream parlour) and go for the short waslk to gelert's Grave, of for an even longer walk through the stunning Pass of Aberglaslyn. Details
here.
From Criccieth, get a bus to Porthmadogsnd then another bus to Harlech, which has another good ruined castle. (#8
here) You coukld get the train from Criccieth, but this drops you at the foot of the cliffs and it is a very (and I mean very) steep climb up to the town and the castle.
From Criccieth, get a bus to Pwlhelli and then a bus to Aberdaron at the tip of the Llyn Peninsula. There are some great coastal walks from here - have a look at these links. Unfortunately there isn't just one website I can send you too!
https://www.nationaltrust.org.uk/porth-y-swnt/trails/porth-meudwy-coastal-walk
https://www.mudandroutes.com/routes/wales-coast-path-circular-walks-gwynedd-aberdaron/
https://www.walkingbritain.co.uk/walk-3372-description
https://www.walkthewalescoastpath.co.uk/routes/walk-wales-coast-path-aberdaron-llanengan/
I've picked these twio bases as there is a good choice of accommodation and they are also good centres for getting around by public transport.