The back plate you show can be one, two, or three outlets, with a programmer, and can also be used with a thermostat so first one needs to look on the back of item removed and see the connection diagram.
I have replaced my messed up system with Nest Gen 3, really a mistake as although it says it connects to Energenie TRV heads it doesn't. But if anything like mine, there will be some where a wiring centre (junction box) and you will need to work out which wires go where to re-use them for the thermostat.
The idea is to have all 230 volt from one plug or FCU so if you ever fit battery back-up it can go to one place, having a thermostat connected to a USB outlet means if supply to that outlet fails even if still a supply to boiler, you have no central heating, so you want to use the T1 and T2 to ensure all comes from one source. It also means the data does not use wireless, it is sent down same two wires.
I went from this
to this
there was no way I was going to get all the wires into the Nest so used a wiring centre. Next to the boiler also needed modifying,
I used a smart socket while working out what needed to be done, then a second wiring centre
I have two pumps which caused a bit of a complication as the water was going in the reverse direction, so needed to all either non return valves or motorised valves, the plumber selected the latter as on the return side, not into plumbing so left it to him.
The old programmer has gone
now replaced with a blanking plate, with a chock block joining the wires so thermostat in the hall.
After doing it myself, first job is to ensure all is working before you start, last thing you want is after trying to work out if you have done something wrong, or if it never worked right to start with. I selected Nest Gen 3 as it allowed full control of heating and hot water from the main house with just two wires going to the flat below with the boiler in it.
The wiring was all up the creak, and the Nest wiring diagrams don't tell you how to wire for C Plan, basic C Plan I had to work it out myself
not that mine is wired like that as I have two pumps, but with C Plan com is out not in, which confuses many.
But as it stands we have no idea if yours in C, S, Y, or W plan, to work it out you need to know. Also most fit Nest as it is already OpenTherm, and if using the OpenTherm option you are starting from scratch. Likely second thermostat is a frost stat, but we are guessing, so start off with what your system is.
The only wire colours you can trust are those to motorised valve, as they come pre-wired, so work out what does what from what connections there are to motorised valve.
Good Luck.