The ban on the use of fuel must come into force from 2035.
The funds raised will be used for green projects, and the EC will report on their impact on the environment.
The Advocate General recommended that the EU Court reject Germany's appeal against the decision to restrict Gazprom's use of the OPAL gas pipeline.
According to him, the EU Commission must ensure the pipeline is used following EU rules.
The EU is currently building 15 factories, which will allow launching mass production of reliable batteries.
The Polish government has agreed with trade unions to close the mines.
Prices for European gas hubs began to decline sharply at the end of December.