If this is for Intune managed devices, for reasons of security and digital hygiene, the best practice is to reset the device, then have the new user go through the AutoPilot process.
For those who may not agree with this practice, there is now an option to change or remove the primary user on the Property view for the device.
You can change the owner of the device via PowerShell.
Add the new owner.
Then remove the previous owner.
You can find the device's "ObjectId" using the following command.
You can find the owners "ObjectId" in Azure Portal or via.
You can use the Cloud Shell feature in the Portal to execute the commands or you could install them locally and connect up.
If this is for Intune managed devices, for reasons of security and digital hygiene, the best practice is to reset the device, then have the new user go through the AutoPilot process.
For those who may not agree with this practice, there is now an option to change or remove the primary user on the Property view for the device.
You could add a new owner and then remove the previous owner. For the details, you could refer to this article.