I did the same route as you (Master's first, then starting on my PhD right now). It's a great route! In general, the best route is to try and join an ongoing project where you can be guided/mentored by a Post doc or senior PhD. This is easiest is larger labs, though in a smaller lab the professor might interact with you more (unlikely you will meet with prof much in larger lab). For your application two things matter: recommendation letters and publications. Joining a project on which you can have mentorship and showing yourself to be resourceful and productive is the best way to attain both. If you find a lack of guidance or a bad fit in whichever lab you first end up in, don't hesitate to try and change things up. In general, also always feel free to ask for advice and guidance; PhDs and post docs have been in your shoes and are more than willing to help out, you can always just ask someone out for coffee to talk about research and ask for advice.