Thermostat wiring splice
A butt splice connector, or twist-on wire connector would be fine. Just make sure you use connectors that are designed for the size, and number of wires being connected.






Technically, you should probably either pull all new wiring, so that it's continuous from HVAC to thermostat. Or put the connections in a junction box, that is left accessible.