The European Coal and Steel Community was created in 1952, to make it harder for members to have the independent industrial capacity to mobilise against each other. Particularly France and Germany, whose grievances began with the Franco Prussian war of 1870 and rumbled on through two world wars.
It became the EU federal superstate we have today because politicians can’t resist a power grab. The EU was created in 1993, so the entity you refer to was not created to end European wars. Because the “member states” (it will never refer to countries) had already been NATO members for decades at that point, guaranteeing each others safety and making invasions like the previous ones unimaginable and infeasible. In fact, with it’s obsession of absorbing more territory and people, gaining power, and lukewarm attitude towards NATO, I think it’s more likely to start a war than prevent one.