I am currently doing my masters. I have done my bachelors and masters from the same university in a remote part of Asia. My experience in my university as an undergrad and grad student is not good. My department environment was not conducive to learning or research. As undergrads, we were encouraged to memorize rather then understanding, developing intuitions or solving problems. Whatever I have learnt, I learnt from the resources available on the internet e.g. OCW, YouTube etc. Only a couple of professors are involved in research. They are not at all helpful or encouraging. They always need to boost their ego, never ready to discuss anything, never ready to accept their mistakes if they made one. The teacher-student relationship is more like, dare I say, a master and slave type of relationship. I actually didn't work with any of them. The main reason I want leave my university and do PhD somewhere else is because of the toxic environment here. Now as I am thinking of applying for PhD abroad, I have this fear that I may not feel at home with the university/ department/ professor/ colleagues that I get into. If I then leave the programme, would that decrease my chances of getting into another university? I know that I might need LOR from the faculty members but since I don't have much experience in academia, I would really appreciate if someone can explain how the situation would become. Thank you.
Such things depend more on why you leave rather than just the fact that you do. If you establish a poor record then it is harder to get in to another program.
But it also depends on where you want to study and the nature of the program that you enter. Some programs give you some room and time to catch up with missed knowledge and some programs provide an especially supportive environment for students.
However, at some level, nearly every student is in your situation at some point. Starting research on a narrow but deep problem can leave you a bit lost for a while until you get all of the very specific background needed to go deeper.
But if the alternative for you is to not try, then that alone will negatively affect your career also. And even taking a gap to "catch up" can be good or bad, depending on what you do with the time and how you can verify that you've made necessary progress.
The advice for nearly every student is to just do it and do your best.