I had the same problem two days ago I literally tried everything from rebuilding database to initializing the ps4....nothing worked it takes the disc start spinning for like 30 seconds and stops and says unrecognized disc that made me go insane and watching all YouTube videos and try the tapping and put it in the horizon way but nothing so I said f*ck it and open my ps4 and see what's really going on... with YouTube guidance of course so I saw the problem there was a dust on the disc drive a lot of it....I cleaned all the dust and checked it took 5 seconds to know the disc I was very happy and put my ps4 back together and played my games with no problems
I don't recommend to open the ps4 urself, I had I little experience and I almost f*ck it up just try everything u can and hopefully something works if not just clean it in a shop or do it urself like me if u needed