“You can connect the dots looking forward; you can only connect them looking backward. So you have to trust that the dots will somehow connect in the future.” ~ Steve Jobs
Like Steve Jobs rightly said, you will have to trust the process and be okay if things do not work out for you. If one door closes, another will open, only if you put in the effort. Keep moving with the best alternative at hand.
You need to introspect and note down your career goal and plan. Think about where you want to be five years down the line and be flexible with it. Start understanding where your preferences lay in terms of subjects and fields. Research about a topic or talk to experienced people to know more about the subject to make a decision. Weigh out your options and think pragmatically. You may not like every aspect of a particular thing, be prepared for it. While taking decisions, consider the emotional quotient also. You will have to attempt and push yourself.
Draw a timeline every few months. Do not get discouraged with what people say, be determined and give it a start. Understand that there will always be a trade-off and make a conscious choice. Be realistic and evaluate yourself. In the end, it is your life so make the most of it.