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

Good spot, Tom. That should be corrected, but the other problem is that they should be D2 and D4 not just 2 and 4 in the code. If the "D" is not used, the number means the native pin number of the esp module, not the pin number printed next to the pin on the NodeMcu board.

I have a relay module board so the diode is built in.

Most relay modules have a transistor built in also. Maybe you don't need the 2n2222. Many relay modules won't trigger with 3.3V if they are powered by 5V. it would be worth trying to connect the 5V pin on the relay module to the 3.3V output on the NodeMcu. Then connect the relay input direct to the digital pin. It's not guaranteed to work, but many do.

@grangemd, I can see that you know how to draw a schematic. Fritzing can do this also, you can use the "schematic view" instead of the "breadboard view".