I've seen a lot of people make the mistake of just grabbing a generic size chart without digging deeper. What really matters is how the frame positions you once you're on it - the size in cm or letters is just a starting point. At 1m72, you'll definitely swing between M and L depending on the brand, but here's the thing people often forget: your arm-to-leg proportions matter too. If you've got legs that are a bit longer than average for your height, an L might be more suitable, even if the standard charts suggest an M.
The best approach is really to actually get in the saddle and feel it out. Look at how things are at the handlebars - you need to be able to keep your back slightly tilted without being bent double, and your arms a bit bent, not straight or too cramped. On a mountain bike it's a bit different from a road bike, the positioning is more upright. If you can, try one out at a legit retailer who has stuff you can test ride - you'll see right away what works for you. And even after you buy, adjustable stems and seat tubes can fix quite a bit of stuff if you're right on the edge between two sizes.