It can drastically reduce the risk but i would not say the word prevent.
Most cervical cancers are due to hpv
) which is transmitted by physical contact. A condom would theoretically eliminate that risk but that assumes that one has no other exposures/contacts. A vaccine would do a better job in preventing most cervical cancers.