Notes:
This only really applies to specific states in the US. I don't know about laws in other countries.
Also not legal advice.
You might want to read this for more details on how to quit in such a situation: https://www.wikihow.com/Quit-As-an-%22at-Will%22-Employee