First check whether the program is truly uninstalled by opening Settings > Apps > Installed apps (or Control Panel > Programs and Features on older Windows). If it still appears in the list, try uninstalling it from there instead of deleting files.
If the program does not appear in the list, you can manually delete the leftover folder. Open File Explorer, go to C:\Program Files (x86), and find the folder with the name of the old program. Right-click the folder and choose Delete. Windows will warn you if the folder contains anything needed by the system—if you only delete folders clearly named after programs you removed, it’s safe.
If Windows refuses to delete the folder because files are “in use,” restart your PC and try again. If you are still unsure about a folder, you can search the name online to confirm it belongs to the old software instead of Windows.
Emptying your Recycle Bin afterward fully removes the deleted folders.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin