The United Kingdom pretty much did what it wanted in the EU. That it chose to pursue a national agenda of austerity and neoliberalism has nothing to do with Europe.
The European Union faces a crisis of legitimacy, and its rules on fiscal governance are at the heart of it.
The European Union was billed as the most important post-WWII peace project. It has failed.