Cut away the plug and a few inches of cable - and fit a new plug.
A common fault is a broken conductor inside the cable at the plug end - caused by repeated tugging over time.
This may not fix the problem but it's quick - cheap and easy and has been the solution for 75% of the vacuum cleaners I've repaired.
Good Luck..., June 2017