How to use Processing 3d in IntelliJ using core library?

You’re missing some JOGL dependencies by the look of it.

You could also try the Gradle examples for libp5x - Libp5x examples - Processing, LWJGL, Gradle and Java 11+ modules