@Richkm Thanks for posting in our Q&A.
For this issue, I agree with LeeFitches. The following article describes how to create an Autopilot deployment profile. We can change device name via the setting "Apply device name template" in the Autopilot deployment profile.
https://learn.microsoft.com/en-us/mem/autopilot/profiles#create-an-autopilot-deployment-profile
Use the %SERIAL% macro to add a hardware-specific serial number. Or, use the %RAND:x% macro to add a random string of numbers, where x equals the number of digits to add.
Hope it will help.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.