This is another question, and the common myth is that it does. The opposite is true! Traffic categorically does not affect rankings. It does not matter how much traffic your site gets or what that traffic looks like – the impact is zero.
It is true that Google’s mission is to rank popular sites, and traffic is one measure of popularity. It is also true that Google probably has a fairly good idea of how much traffic you get (whether or not you have Google Analytics installed). But they do not use traffic as a metric for search results for the simple reason that it’s too noisy and too easily manipulated. In short, there are much better ways for them to establish and measure your site’s popularity.
There are a few reasons that might explain why this myth has arisen. One is that Google does use links as one measure of popularity, and more links will also bring more traffic (so this is a classic case of correlation being confused with causation), and the same is true of social media activity.