Android phones save wifi passwords in a particular configure file when you connected to a network. You can see all the saved WiFi passwords on Android phones.
All you need is
1.Root your phone (see how to root your phone)
2.Install superuser app or magisk
3.Install wifi password show app from playstore (root required to use the app) or use root file manager app.
Method 1:With App:
Wifi Password Show app will show you saved passwords with one click.
The wifi passwords on Android are stored in a configuration file,the file path is /data/misc/wifi/wpa_supplicant.conf.
From Android Oreo the file path is changed to /data/misc/wifi//WifiConfigStore.xml.
This file is usually own by a system user like wifi or root. So you have to be root if you want to read wifi password directly. without root ,it is not possible to view the wifi password config files.
1.Open the app
2.Grant superuser permission
Method 2: Without app but using root file manager
If you have rooted phone. Then you actually no need to use any app. But the process is little bit time consuming compared to using The App.
1.Open playstore and install root file manager app.
2.Open the app ,in the settings select “root explorer” it asks for granting super user permission and allow it.
3.Go to the file path either
/data/misc/wifi//WifiConfigStore.xml. or /data/misc/wifi/wpa_supplicant.conf.
Open the file in a note editor.You will see wifi network names,passwords and many details in that file.