I have a circuit to control my doorbell but Voltage on pin is too low

So D4 is GPIO 2 and D2 is GPIO 4 so I think the way this is set up is ok because I put it without the D here so it goes to the GPIO number.

Correct. Apologies.

So, your OP said that the pin was outputting only 1.2V. Have you checked the voltage from the pin if the circuit is disconnected from it? It should read 3.3V. There is a 12K pull-up on that pin on the NodeMcu board. In theory, you do not need INPUT_PULLUP as well, but it won't cause a problem.

Have you checked the cable & door switch, in isolation, for continuity/short circuit? What is the resistance when the button is pushed and not pushed?