Gold is valuable because people agree that it is. It's the same with an abstraction of value. Gold does have problems though, which bitcoin can solve. Bitcoin certainly has the potential to be a better store of value than gold, one more suited to our modern digital world.
Bitcoin does of course have its problems as well, not least of which being the volatility. But unlike gold, bitcoin is under development, and these problems can be overcome. Give it time, bitcoin will become the standard store of value. Bitcoin (and crypto in general) has been a phenomenal success already, but it is still early days. There is so much more to come.
The majority of people through history have agreed that gold has value because of its amazing characteristics and even to this day the characteristics of gold make it an even better currency than any fiat currency around the world, the biggest advantage that bitcoin has over gold is that it is digital, it is difficult to carry with you any big amount of gold without raising questions about it but you could carry all your bitcoin balance and no one will ever know it unless you reveal that information by yourself.
And it has been the basis of the wealth of people since the beginning, and gold is really valuable as it is hard to mine it too, but let's not compare the gold over the Bitcoin because they really differs in everything, we need both of them now and in the future, so if you really aiming to invest, then better to have them both.