This is done with an expansion valve. It separates the two circuits from each other by means of a plug, here seen in the middle:
This is permanently held in the closed position with a spring. With the help of a sensor bulb and a separate pressure area, a second spring is effectively being created which acts on this plug. It attaches to a point further back in the circuit and pushes the plug to open or close. It also allows more coolant from the condenser to the evaporator.
The pressure difference at which the valve opens is the result of the balance between the sensor bulb pressure and the lower spring. In order to be able to adjust this, there is a screw under the spring. Depending on whether you screw it up or down, the pressure of the spring changes and the balance between the spring pressure and the sensor bulb changes accordingly.
In the example shown here, it is a greatly simplified graphic and of course there are different exact versions in practice. Expansion valves are very filigree components and, depending on the application, are adjusted accordingly in detail. However, the basic principle works fully mechanically and without electronics. Although, of course, instead of the adjusting screw, a servo motor could also be integrated, for example.