Thanks for posting your question in the Microsoft Q&A forum.
You must first connect them to Azure through Azure Arc using the Azure Connected Machine agent, then install the Azure Monitor Agent via Arc to collect logs and metrics. The Arc agent only handles onboarding and management, while AMA performs the actual data collection and sends it to a Log Analytics Workspace. For on-prem or hybrid setups, both agents are required Arc for connection, AMA for monitoring, since the old Log Analytics (MMA) agent is now deprecated.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful