To enable the Defender Connector to allow you to connect M365 to Microsoft Sentinel, please see: https://learn.microsoft.com/en-us/azure/sentinel/connect-microsoft-365-defender?tabs=MDE
Pay special attention to the prerequisites mentioned.
If this helps, please accept the answer.