The first thing I would suggest you do is see places right in and around Cardiff. That includes CARDIFF CASTLE & THE MUSEUM OF CARDIFF in the middle of the city plus THE NATIONAL MUSEUM OF WALES = a 14 minute walk NE of the Castle. On the same day, I suggest that take a trip down to the waterfront (CARDIFF BAY) - Cardiff Bus 6 from outside Wyndham Arcade on St. Mary Street (southbound).
The best part of another day should be devoted to ST. FAGANS CASTLE & MUSEUM OF WELSH LIFE (free) - which covers a huge site in a village just outside the western outskirts of the city. Cardiff Bus *32 (usually hourly - so make sure you know when they leave to come back to the city). These buses go from Wood Street near the Betty Campbell statue as well as Westgate Street (Stadium side) and outside the Holiday Inn near southern entrance to Bute Park - which has ferries to the Bay by the way. * Be sure to hold out arm to stop bus.
You should also find time to try and visit CAERPHILLY CASTLE - about a 20 minute local train ride N of the city. (Huge medieval fortress but the town of Caerphilly is a dump). You might like to take a walk in CEFN-ONN-PARK = a 5 minute walk from Lisvane station on the Caerphilly line. This is a temperate woodland style park. (A return ticket allows you to hop off and back on a later train).
CASTELL COCH - on a hillside on the northern edge of the city is also worth seeing. Stagecoach Bus 132 (final destination will be Maerdy) to Tongwynlais plus a steep 20 minute walk to the castle. These buses leave Greyfriars Road in Cardiff (at present) - across the street form The Hilton Hotel.
You can do Tenby by train and most of the line goes through pleasant enough countryside and along a lovely estuary on the approach to Carmarthen. However, it also passes through industrial Port Talbot with its huge steelworks. I just did a check for Tuesday and see a train leaves Cardiff at 9am & you arrive Tenby at 11.41 with a change at Carmarthen. Trains back at 14.46 to arrive Cardiff at 17.40 with a change at Swansea or 17.04 from Tenby direct to Cardiff arriving at 19.53. Fares are around £28 there and back.
Also consider a train ride to SHREWSBURY (2 hours) and perhaps take a quick look at LUDLOW on the way back. This line goes through lovely countryside most of the way. Fares tend to be higher on this route & trains are direct and at roughly hourly intervals to both places. If doing this it might be best to buy Anytime Day Return Cardiff to Newport at £6.70 plus Off peak Day return Newport to Ludlow at £27.10 plus Off-peak Day Return Ludlow to Shrewsbury at £15.10. (Off peak fares apply after 9.30am on weekdays and anytime at weekends). The above would give you flexibility. Of course, you could just go as far as Ludlow - have a look around and then decide if you wish to go further N to Shrewsbury or return to Cardiff - in that case you would buy the LUD > SHR leg at Ludlow. (You would obviously note down when the trains leave). See also > https://www.abergavennyfoodfestival.com
All fares quoted do not include Railcard Discount. A train leaves Cardiff at 9.22 for Ludlow & Shrewsbury (it is going to Holyhead) so the RC could not be used on the first bit to Newport on a weekday but could after Newport. Abergavenny is a nice enough place and it is a good 15 minute walk from the station to the town. However, both Ludlow and Shrewsbury are better with many very old buildings with beams.
Google all the places mentioned. Note that Tenby is a lovely seaside town but the really wild bits of the coast are just a bit further west. The station is right in the town.
www.nationalrail.co.uk