Postman Pre Request and Test Scripts Tutorial - Introduction to Postman https://youtu.be/NA2nfftMC5E
Additionally, you can watch the whole intro series I made for a good basis on Postman.
Introduction to Postman Tutorial https://www.youtube.com/playlist?list=PLtnFhV9xWljfvww1P_fNgb0cnA4H-zmZQ
Now if you’re trying to use Java to run Postman requests, you can do so via Postman’s api and building requests in Java from Postman. Or you can use Newman that you can kick off from your Java code.
If you can elaborate a bit more on how you’re trying to run the automation, I’d be more than happy to provide more details .