Hi, I think a masters degree is a big commitment so if possible, you should check the profile of current phd candidate in your top choice school or better yet reach out to them for information before commit to that. I do agree with @instajar that research fit is the most important and if you can get a research project going you can reach out to the professors of that uni from platforms like research gate. You can also check for conferences where you have the chance to network with the faculty of that uni
Im sorry you got rejected but the admission process is quite biased and complicated so don't feel too down.