Leave US when PERM is in progress and re entry

What’s the process of staying in US and re-entering US when H1b Max out?

My h1b will be max out in Jun2023 (including vacations days) and Perm will be filled in Aug2022. Going by the trend PERM+i140 it will take more than 6 months(if audit then longer). If I have to leave US in Jun 2023 , will I have to be on cool off period of 1 year or just visa stamping is needed if I want to come back?

Once your I-140 is approved, your employer can file AC21 extension so there is no cooling period as such. Make sure you leave the US while few days are still left from your 6 year term.

If your visa has expired and you travel outside the US, you will need to go for stamping.

Alternatively, you can leave the US for few weeks and work from India and claim that time to extend your 6th year stay beyond Jun 2023.
Consult your company immigration lawyer to discuss your options.