The DRC has enough cobalt to maintain current output for 30 years, and has about 50% of the world's known convenient cobalt reserves (source: ‘Peak’ cobalt is not on the horizon – S&P’s Global Market Intelligence). About a third of the remaining reserves are in Australia (source: Top Cobalt Reserves by Country). That gives perhaps 60 years at current output, though that only takes you up to the 2080s.
It is awkward to find information on unconventional cobalt sources, but such things almost certainly exist because cobalt isn't vanishingly rare, after all. Given a strong enough economic incentive, exploitation of more expensive and less convenient cobalt reserves, and more aggressive reclamation and recycling of existing cobalt, would become viable.
Notably, current estimates of cobalt reserves only look at continental deposits. There's almost certainly an awful lot of all sorts of valuable minerals at deep sea sites, cobalt included. As there isn't currently a good survey of deep ocean mineral deposits, there can be as little or as much of them in your story as you need, and they can be as easy (or environmentally sound) to exploit in your future setting as you want.
Cobalt is used to make electronic component. In a world where most of the country works with renewable energy is used to create batteries.
That's true now, but it won't necessarily hold true for the next 80 years, especially in the face of vanishing reserves of critical strategic metals.
What's more likely is that alternative materials and technologies will arise that will use other materials that are more readily available and reasonably priced. Such things are already on the way, but they're not quite economically viable yet due to the current availability of the problem materials.
Since for my story Cobalt is the key element i need this information, or should i ignore this fact and pretend that there will be cobalt avilable in the near future?
Do you need cobalt to be scarce to drive your plot? Great! There's a reasonable chance it will be! Would you like your setting to work even in the absence of cobalt? That's fine too! There are plenty of alternative technologies that are either being developed now or will plausibly arise over the next eighty years.