Form that generates an ID for the customer

WordPress doesn’t provide contact forms by default. So either you’ll have to use a form plugin or you’ll need custom CODE anyway.

Since you didn’t provide any CODE or reference to any plugin you’re going to use, I cannot provide a sample CODE that’ll work for you. In principle, plugins do provide custom hooks that can be used to create the unique ID field for your user. However, make sure you keep that form field disabled and save the value while creating the unique ID (instead of saving after user’s form submission), to make sure the ID cannot be altered by the users.

For example, if you use Contact form 7 as your form plugin, then there is a plugin called UniqueID for Contact Form 7 that provides similar option. You may check that plugin’s code and implement your own. Similar implementation is possible for WP Forms, and I’m sure other form plugins provide similar options as well.