Doing that will reboot your taskbar and eventually bring back the hidden icons. You can also try restarting Windows Explorer.
However, don’t use the Restart PC option instead shut it down completely and then turn it on. Let’s begin with the simplest solution - restarting your PC. So if you are facing the issue of invisible taskbar icons, give a try to the solutions mentioned below. While it mostly happens with Microsoft apps such as Calculator, Edge, Photos, etc., the issue isn’t restricted to these apps only as it can happen to any app. One can see the reserved space of the icon, but the actual icon isn’t visible (ghost icons). In some cases, the app opens but no icon appears on the taskbar.
Well, what I mean is the pinned app icons either disappear from the taskbar or don’t function. However, sometimes, the taskbar becomes spooky, and it makes you regret your decision of pinning the apps. It saves the trouble of searching or opening the Start Menu to find the app. Pinning the frequently used apps to the taskbar is quite helpful.