All Cognito Forms entries automatically have their own unique ID number based on the order that they were submitted in.
You can reference this number in calculations and in other places on your form (such as the form confirmation page) using the expression: =Entry.Number
If, however, you want to create a custom unique ID - you can do that too.
Learn more about generating unique IDs for your form entries.