Hi @avi-fatal
Could you please check this page to learn more about registering custom fields via PHP: https://www.advancedcustomfields.com/resources/register-fields-via-php/?
Also, you can always create the field groups from backend and then export it to PHP code from “Custom Fields > Tools” (PRO version) or “Custom Fields > Export” (free version).
Thanks 🙂