@Vij, Thanks for posting in Q&A.
Currently, there's no rule to create dynamic group with installed software. here is a link with more details for the reference:
https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-dynamic-membership
For your situation, I notice you want to uninstall the app. Maybe you can use Intune win32 app to uninstall it by packaging the app, setting correct uninstall command which can run silently without user interaction, setting detection rule, adding all devices under uninstall assignment to see if it can be uninstalled. Here is a link about win32 for your reference:
https://learn.microsoft.com/en-us/mem/intune/apps/apps-win32-app-management
Hope it can help.
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.