I would take the train from Southampton to London Waterloo. Waterloo has a left luggage service right there at the station called Excess Baggage. It’s not cheap (about £10 or £12 a bag) but it’s handy.
From there, head towards the London Eye on the bank of the Thames - very short walk, signposted. Right opposite you, the classic view of the Houses of Parliament.
From the London Eye pier you can pick up a Thames Clipper there for a quick river trip, or a sightseeing boat for a longer trip with commentary. https://www.londoneye.com/tickets-and-prices/general-tickets/river-cruise/ Both will take you down to Tower Bridge and the Tower of London, those other classic London sights.
Or you could walk along the South Bank heading east for a really interesting stroll with lots of good things to see. Depending on how long you have, you could walk down to the Millennium Bridge, walk across to look at St Paul’s Cathedral.
From either St Paul’s Cathedral or Tower of London, you can catch the number 15 bus all the way to Charing Cross, from where you can have a quick peek at Trafalgar Square before crossing the river back to Waterloo to collect your bags.
Are you flying from Heathrow?
From Waterloo to Heathrow, several choices:
Cheapest is tube all the way - Bakerloo line to Piccadilly Circus, then switch to Piccadilly line and take it all the way to Heathrow.
Or Bakerloo line to Paddington, where you can pick up the Heathrow Express (much more expensive, a little quicker). Or jump in a cab to Paddington for the Heathrow Express.
You’ll need to leave an hour for the journey back to Heathrow, so this all very much depends on your flight time!