It will depend on the structure of the whole sentence. not work would normally be used after a word such as does or can, for example, and does not work is the same as doesn't work, do not like is the same as don't like. I don't like eating snails.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.