@VikramVI
These links can be helpful for better understanding.
how-to-inspect-and-automate-webview-in-hybrid-app
https://discuss.appium.io/t/switch-to-webview-using-getcontexthandles/578/15
https://discuss.appium.io/t/how-to-switch-to-webview-context-using-safariluancher-app-with-c/8600