It was about money.
People were poor, wages had hardly grown after years of austerity following the 2008 crash. A huge campaign pointed the finger squarely at the EU: they are taking our money, they are the reason you’re poor, you would be richer without them.
People believed them.