Based AC-21 Portability Rule for Pending I-485 Petitions, you can change the employer or job if your employer sponsored I-140 based (e.g. PERM EB2, EB3, EB1-B) I-485 has pending for > 180 days and the new job is in the same/similar field as the old job, and it is very safe if the I-140 has been approved before you change job in this case. See: https://www.usavisanow.com/ac-21-portability/
If you have NIW and EB-1A based I-485, you can change job any time, not need to wait for 180 days.