H1-B visa transfer after job termination (2021)

My H1B valid till 2023 and my I140 is approved. I am a fulltime employee with a service based company. My project got over, so HR sent me separation notice my last date in 3/31/2021.

Since I am with H1B, do I have option to legally stay for sometime and find any opportunity? If yes how long can I stay legally to find an employer who can transfer my Visa?

Appreciate your quick response!