To upgrade to S, you need to first upgrade samsung firmware to an Android 12 based, but not the latest as it said in the documentation because it will include a security patch level more recent than the one included in latest /e/OS build and you won’t be abble to install /e/ for this reason
Then flashing a custom recovery, and finaly /e/OS