alright heres the ans n rate me .
When it is heavily doped both the p-region n n-region automatically will have more no. of free electrons n holes resp. as a result they initially move across the junction n combine with opp charges.that is electron-hole recombination takes place.
due to this near the junction v r left with only donor atoms i:e;holes in n-region n e in p -region these atoms r bound n therefore immobile.
As a result of heavy doping more no. immobile charges accumulate in the depletion region.An electric field is established in this regionwhich prevents the further flow of electrons from n-region 2 p-region n holes from p to n-region.
This happens bcoz the overall -ve chargeof p regionbecomes sufficient 2 repel free e from n-region stopping them from crossing over n viceversa.