Hi, The question is a little bit unclear. Data collection rules does not install the Azure Monitor agent. You need to install the Azure Monitor agent manually, create DCR and assocaite the DCR with the Azure VM or Azure Arc server .
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.