@Ahmed Alshatawi, Thanks for posting in Q&A.
From your description, I know you want to remove the old Teams classic versions from the devices using Intune.
Based on my research, we can achieve that by configuring PowerShell script, uploading it into Intune and then deploying it to devices to remove Microsoft Teams classic.
Here are links about the content of script and how to use PowerShell script on Windows device in Intune you can refer.
https://scloud.work/new-teams-client-and-cleanup-the-classic-intune/
https://github.com/morganthau1/Teams-Removal-Script
Non-official, just for reference.
How to Add PowerShell to Intune:
https://learn.microsoft.com/en-us/mem/intune/apps/intune-management-extension
Hope above information can help you.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.