In an unbiased p-n junction (no battery connected), which side is at the higher electric potential?
When the junction forms, electrons diffuse from the n side to the p side and holes the other way. They leave behind fixed positive donor ions on the n side and fixed negative acceptor ions on the p side, forming the depletion region.
The positive ions put the n side at the higher potential, by the barrier potential of a few tenths of a volt. That built-in barrier is what stops further diffusion, and it exists even with no battery connected.
Every Level 2 starts from a quick question, Level 1, and changes one thing. Seeing what that change does is the skill JEE Main tests. Try it here, free and with no signup, then read the worked answer.