Group Policy
If you are still hybrid or using co-management, you can use a Group Policy Object (GPO) to specify who can log on locally to the computer. The setting is in Computer Configuration \ Windows Settings \ Security Settings \ Local Policies \ User Rights Assignment.
The default settings include 'Users'. One option would be to remove 'Users' from this security setting and replace it with 'Domain Users'.

Intune/MEM
If you are fully Azure AD Joined and only using Intune/Mem to manage all device configuration, you can still configure this setting with a policy. At a high level, the approach is to:
- Create a new configuration profile or edit a relevant existing one
- Add a new configuration setting
- Browse the settings picker and choose the 'User Rights' category
- Select the 'Allow Local Log On' setting and add only the groups that you want to allow.
Note that with this approach, you'll want to test very carefully before deploying to production. This policy could have unintended effects and some can also affect Autopilot -- although I didn't see this exact setting listed regarding Autopilot conflicts.