Question:
What can the EU do against China's mineral bans?
I'm guessing you are referring to the rare earth metals gallium and germanium, which are used to build computer chips. The ban went in effect August 1, 2023.
In the short term 1-2 years most countries have strategic reserves of these minerals and there are other sources beyond China. Despite the name, these minerals are not rare. It will probable take 1-2 years for other sources to ramp up production. Rare earth metals are extremely messy/dirty to produce so many advanced countries were happy to let other nations/nation take over the production and thereby obviate the need to have domestic production. Interestingly enough China became a net importer of rare earth elements back in 2019. So China is both the largest exporter and largest importer of REE. So destabilizing the international market for these elements isn't going to work out well for China with regards to domestic supply or pressuring the West.
In the long term the impact is going to go beyond rare-earth metals. You are going to see countries continuing to diversify their supply chains and not be so dependent on a single source for various trade items. Which is probable a good thing. But it is a thing which accelerate the impact on several trade niche's where China currently enjoys a dominant market share. Pharmaceuticals, automobile manufacturing, machine assembly manufacturing, batteries, and plastics. These diversification policies will likely make prices go up, but in the long term prices will be more stable. These types of safeguards were already happening prior to the REE ban and are probably one of the things China is reacting to in putting their ban in place.
Lastly I want to observe that the EU is a very important market for China. China has tried sometimes successfully in the past to divide the EU and engage with them piece meal. This gives each member state less influence and ultimately the whole less influence. The EU has been successfully pushing back on this over the last few years.
A united front certainly among EU nations gives the EU a lot of influence over China. Influence commensurate with being one of China's largest trade partners. China has tried to test this unity by giving preferential treatment to some and singling out others for punishment. Create special relations with some while excluding others. Which is understandable and good business on China's part. Going back to your original question, what can the EU do? Stay united. The EU is in a very powerful position and it's really only if they fracture and can be handled piece meal that China has an advantage. China's economy remains one overly dependent upon trade, and the EU market is the largest and wealthiest market in the world. A unified EU can hold its own against China. More problematic but even more influential is when the EU and US agree on a unified front.