@Nourah Almutairi Thanks for posting in our Q&A.
For this issue, intune does not directly have a capability for this. However, you can use Intune to configure and enforce AppLocker and/or App Control policies that will do this. See https://learn.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/deploy-windows-defender-application-control-policies-using-intune.
Hope it will give you some ideas.
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.