Oh my dear, that is a really tough one.
I can't give you a 100% advice on what you should do. But I know what you should not do.
Don't blame yourself. There is absolutely nothing wrong with you. Being gay is as natural as being straight.
People are stupid and easy to scare if something is not going the way they planned it. especially if the "norm" and society they are surrounded by is not allowing any exceptions. Don't let it stop you from living your live. (easier said than done)
Technically you could try to apply for asylum. Some European countries may accept your asylum application.
But getting asylum granted will be difficult. Sadly your first hurdle will be to prove that you are gay and in life danger because of it in your country. Because they will grant asylum only if they are totally convinced. So I personally would try to avoid this way if possible.
An "easier" way is to move somewhere where it is not illegal and start new.
You are 23.. so what did you learn? Did you study? maybe there are possibilities to get a student or work visa somewhere...
all the best and keep your inner strength