The answer here is, indirectly, yes it can.
Traffic alone might not directly affect your ranking, but it can improve the engagement and domain authority of your site. With these improvements, you might see an increase in backlinks that do drive rankings.
It’s all about the quality of that traffic.
Google wants users to find what they are looking for. Time on site, page views per session and bounce rate tell Google whether or not that is happening. To improve these metrics, ensure that your site contains relevant, engaging, and informative content that is easy to navigate and understand.