Form submisson with php

Hello, I had a question. I have made 2 forms on 1 site. I have my own VPS server so that is where my project comes to run. The site is still under development.

Now we have decided to run mailer via PHP. We can make the script ourselves, but where can I call them in the form. Do I need to place it in the form itself or should I place it somewhere with webflow.

I do not do it myself but a friend of mine is going to make it.

Thank you for your time.