As part of security measures , enviorments should be monitored and gaining visibility of threats . For this you can integrate defender for endpoint so all your machines report any threats in form of alerts or automated responses.
Make sure you get covered all the licensing requeriments
Go in the endpoint Security blade in intune and click the option Create a device configuration profile to configure Microsoft Defender for Endpoint Sensor
Configure the policy as default or alternatively you can setup options
Choose sample sharing and telemetry settings if required.
Assign the policy for the machines that will be onboarding
Integrate with 365 Security console
In the Microsoft 365 Defender blade , enable the intune connection , using settings -> Endpoints
On the Advanced Features blade . Ensure You have selected Microsoft Intune Connection
Once all is set you should start seeing devices onboarded in the Device Inventory blade