Should I quit PhD after 4 years?
Think of being a PhD student as a job.  If you think there’s another job you’d prefer, then switch jobs.  It’s no more of a waste than spending two years at another job that you end up leaving.

That said if you already have some substantial work finished you might ask your advisor if you can just graduate this year with a weak thesis.