I'm not sure if the regulations are the same in the EU but in the US, they will not allow you to leave the facility via any kind of public transport (taxi, Uber, bus, etc). You have to have someone over the age 18 that you bring with you to be responsible for you after surgery.
In the case where you are put under (as you are for a hysto), you are also not legally capable of making decisions for about 24 hours (again, not sure if rules are the same).
So my first suggestion would be to make sure the facility doesn't have rules about how you can be discharged.
If they do allow you to just leave, I would still not recommend it. You'll be very sore post surgery and on some strong pain meds. It wouldn't be very safe for you to be unattended and very vulnerable.
Are there any medical services you could look into for transportation? Or anyone that could come with you for even a short period of time from home?