How to add new customer via email using Shopify API integration

I’m working on my Shopify store and need some help with customer creation. I’ve set up an email collection form on my site, and when users click the submit button, I want to automatically register them as customers through the API.

I’m not sure about the best approach here. Do I need to set up a private application in PHP to access the API endpoints? Or is there a way to handle this with Ajax calls directly?

Also, if I go the private app route, would I need to make requests to an external server and then redirect back to my store within the PHP script? Any guidance on the proper workflow would be really helpful.

I’m pretty new to Shopify development, so detailed steps would be appreciated. Thanks in advance for any suggestions!