What would happen to the world GDP if we run out of minerals to mine but not of sources of energy? I was thinking about how the depletion of minerals (metals and all material we mine from the Earth) will affect the GDP of the world. I read somewhere that at the current extraction rate, we will run out of easily accessible iron ore in the next 60 years.

I found this Wikipedia article and it seems that about 1% of the world GDP is in extracted or mined minerals.

A simple prediction would be that the world GDP would drop by 1%, but thinking about this more and not I'm not sure if this is correct, I think the lack of mined metals and minerals would have a much bigger effect on the economy than 1% since this 1% actually contributes a huge sum to the rest 99% and without it, we will just end up with whatever we have and will not be able to construct, manufacture or build anything anymore.

So to make this simple and to make sure that energy sources are out of the equation, let's assume that humanity will never run out of sources of energy like oil, gas and coal, but will run out of all metals and minerals that we can mine so that there is no any additional minerals being added to our economic system. How would that affect the GDP of the world?
You're correct that just because 1% of the economy is in mineral extraction, doesn't mean that stopping it would reduce global GDP by 1%. Similarly, roughly 10% of global GDP is on energy expenditure, and about the same on food, but if we stopped either of those, global GDP drops to pretty much zero.

Do bear in mind that we will stop using coal, oil and gas quite shortly - probably within 2-3 decades. Nevertheless, we've got no shortage of energy - we've got far more solar energy available than we can use.

However, minerals aren't going anywhere: very little of them leaves the planet. Which means almost all the elements we've ever mined, are still around.  And retrieving valuable elements from waste is largely just a matter of energy, and a bit of know-how.

Let's think about what might happen if an element starts to become scarce.

First, its price goes up.

As a result, there's investment in substitutes, as they're now more competitive.

There's also investment in recovering the scarce material from waste streams, as this investment now has a higher payback -  a higher financial return on investment.

The short-term effect on global GDP would be a small reduction. The longer-term effect could go in either direction. But, ultimately, the global effect on humanity will be positive: sooner or later, we're going to need to move a circular economy, and this transition will be part of it.