I94 Admit until date

Had a question on I-94 …

Currently my Passport has H1 visa up to OCT 2022(Pre Covid stamping) and my new I 797 has expiration OCT 2024 . Since I am travelling back to USA on JUNE 2022. What date would be used on I (4 for Admit Until date - I 94 - OCT 2022 or OCT 2024

Thanks again

Date should be based on your new I-797. Make sure you present your current and new/extended I-797 to the immigration officer.