do you already have a custom recovery manager installed ?
if not (comming from stock), fisrt install latest android 13.0.0 (TQ3A.230901.001, Sep 2023) based stock OS to follow the “official way”.
then Install /e/OS on a Google Pixel 5 - “redfin”
this guide can help