There are two issues.
One is, will the airline in Vietnam let you board? You, yes. The airline knows that Thailand has extremely lax entry policies towards Europeans. If your passport is valid, they will let you on the plane.
The other is, will the Thai immigration people actually let you enter?
It might not matter. There are two international airports in Bangkok: BKK (Suvarnabhumi) the “main” airport and Don Mueang (DMK). If you are flying in and out of the same airport, you don’t have to even go through immigration: you just walk from one gate to the other.
But if (as is not unusual) the flight from Vietnam lands at DMK but the flight to LHR departs from BKK, you will have to go through immigration.
If you do, well, it‘s still fine. UK citizens (and realistically, the citizens of any First World country) can re-enter Thailand as many times as they want, so long as they do so by air, which is your plan. You used to be able to do so by land and sea as well, but the Thai got tired, for whatever reasons, of farang living permanently in their country by just driving to Cambodia, having lunch, and coming back, once every 29 days.