Hello,
Here are some links to get you started:
https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing/all
https://processing.org/reference/libraries/serial/index.html (some of the examples need an update)
https://www.oreilly.com/library/view/arduino-cookbook-2nd/9781449321185/ch04.html
https://github.com/processing/processing/tree/master/java/libraries/serial
There are some examples that come with Processing and Arduino.
There is lots of discussion on this topic out there and in this forum also.
I have written all of my own serial communication routines building on what I have gleaned from examples and my own experience.
:)