Intune Device Categories are useful for dynamic groups and reporting, but Intune will not set them for you based on how a device enrolled.
This Azure Automation runbook reads each device’s Autopilot or Windows 365 enrollment profile and assigns a matching Device Category automatically, so new devices land in the right bucket without manual tagging.
Schedule it in Azure Automation and let category assignment run itself.