Its very straight forward. If you have nail polish on and then perform ablution , the ablution is not valid. hence if you pray, you’r are merely wsitng oyur time , thinking your intentions are right.
If you performed ablution and then performed wuzu and then prayed , there’s is nothing wrong in that.