You can change job when:
1. I-485 has been pending over 180 days
2. I-140 approved
It's risky to change job before I-140 approval. For example,your sponsoring company may revoke your I-140, or USCIS may issue RFE questioning the company's ability to pay, which is quite common nowadays.