Starting out in research can be overwhelming and the mix of things you describe sound familiar (and probably will to many researchers, if they are honest about it).
Of course, with experience, some of these things will either disappear or become less. Even with 20+ years of experience, it can still be intimidating and challenging to change topics, but what wins out for those researchers is the joy and excitement of learning and discovering new things. Internal pressure will hopefully gradually develop into strong internal motivation - again, because you find joy and excitement in not knowing now and figuring out ways to know more later. Discouragement is something that will also hit you less hard as you become used to the fact that failure is a large part of the game - you need to learn to love troubleshooting and getting back on the horse when you fall off - because in research you will continue to fall off on a daily basis.
I think what you need to figure out for yourself - and this can totally start at the MSc level - is to whether you have that inner spark and desire and drive to make it through all of these difficult challenging aspects. Does your love for research and tackling the unknown win out over all the challenges it presents? In other words, do you think you are someone who will be comfortable (and even happy) not knowing and not getting things right on the first, second or third try?
I think that a hint of that 'spark' can/should be there prior to the start of e.g. a PhD. "Not so bad" (as you describe how you feel at the end of your thesis") might not be a strong enough intrinsic drive to embark on more research (especially when you are talking about a PhD, which is a whole other ball game as the tension arch is longer than that of an MSc thesis and on top of that you will also feel the responsibility of making sure that you succeed because your topic is now first and foremost your responsibility).
So my advise would be to talk to people who have done or are doing a PhD. Do you recognize some of the things that motivate them? Can you, knowing what you know now, gain some additional research experience in an internship or something similar to see if and how your second experience feels different from the first one?
This is very personal and not for everyone - so listen to your gut: if the positives don't outweigh the "negatives" (ie the challenges that you mention), then there are plenty of other things you can do with your life!