Using different Voltage LED strips with one PSU

I got 2 adressable led strips. One requires 12v and the other 5v. I also got a 12v power supply. When using 2 esp32 boards, i can use the 12v power supply for the 12v strip and the power from the esp (vin port) to power the other led strip. Can i get this to work using only one esp32? Is it possible to connect the 12v strip to the psu while the 5v strip is connected to the vin pin on the esp32?

As far as power for your LEDs, you need to match the voltage of the supply to the voltage of the strip.
A 12V supply will work for a 12V strip, it will destroy a 5V strip.
What you can do is get a 12V->5V buck converter to cleanly drop the voltage of the 12V supply to 5V and use that to power the 5V strip.
You can also use that output to power the ESP32, many ESP32 boards don’t like more than 5V for their power input.

As far as data, both the 12V and 5V strips use the same 5V data line, you can connect the data from one to the other as long as ground is common between them.
Make sure you get a proper levelshifter for the ESP32 to raise its GPIO(s) from 3.3V to 5V so that you have reliable data.

You can drive the 2 strips from either 1 GPIO or 2 as you wish.