What steps are taken by the OS when an app is uninstalled? I recently reported bug for two apps that I use. The support guys replied that I need to delete cache and unblock notifications, set battery optimization and putting that app to sleep to turned off. These are understandable steps to fix an issue. 

What puzzled me that both the app support guys additionally suggested that I should uninstall the app and reinstall. Which I will not do because that will mean I have to manually download all the downloaded content again (more then 50+). Seems like a nuclear option. 

I am not an Android developer, a .Net full stack developer. Their response made me curious and now I want to know what happens when an app is uninstalled. What made the support guys of these renowned apps to tell me to go nuclear and uninstall the app and then reinstall again?

Additionally which these steps can be performed without uninstalling the app to verify if issue is not with code of the app but it is some other factor?

This question is not regarding those two apps that has bugs but rather to get better understanding of the life-cycle of an Android app.

As of my understanding, in my .Net app most bugs usually are caused by either code or cache issue (tbh cache issue is also due to code not properly handling caches).

As my understanding in Android is limited, I tried to research what are the events and tasks that Android OS performs, that might cause an app's bug to get fixed (Not an effort to fix issue for those apps, rather to understand what Android OS does) however I didn't find much resource on the internet.
Uninstalling an app will remove entry from /data/system/packages.xml, and delete package from:

/data/app/ (apk file)
/data/data/ (user data and cache)
/data/dalvik-cache/arm/ (translated java bytecode to executable dalvik bytecode)

Clear cache can performed from the android settings. Custom recovery twrp has option for wipe the dalvik cache.