Well… Let me explain a little bit of how the PIR connections are supposed to go and maybe that will shed a little light on what exactly you are trying to accomplish with it. Obviously, there is the 12v input connection to power the PIR unit. It has a “tamper” circuit and an “alarm” circuit.
The “tamper” circuit is an input loop for the sensor that you would normally hook a switch or button to. Most typically, that is a magnetic reed switch connected to a door of a security cabinet. It is ALWAYS a normally closed circuit bridging the two terminals of the “tamper” connections. Since that input is generally used to let the system know someone opened the door to the security system (usually unauthorized), it triggers an automatic and instant “alarm” output. The “tamper” terminals would not be connected to the ESP32 at all unless there is a use I am not aware of (which is quite probable). It could be wired to an external switch for a manual trigger though.
The “alarm” terminals can be jumpered for normally open or normally closed with the “O/P Select” jumper on the PIR sensor unit. So when this thing powers up, it will either open or close those terminals depending on what position you put the jumper in. I did note that the PIR module has a 2 MINUTE startup delay. So once you put power to the thing, go grab a cup of coffee because it takes a bit for it to get fat and happy. It isn’t going to do anything until it has fully started up. The “alarm” terminals are going to be what you would use for a trigger to the ESP32 when the sensor sees motion. In that, I would assume that the O/P should be set for NO so that when motion is triggered, it bridges (closes) the “alarm” terminals, closing the trigger loop you wired to the ESP32 pins. So it would be as simple as 3.3v to alarm terminal 1 and alarm terminal 2 goes to an analog in pin on your ESP32 board. No additional resistors needed. The ESP will need it’s own power supply or a buck converter pulling from your 12v supply to provide the 3.3v needed for the ESP.
Does that help a little?