I think Sitename.com/question-title/123 is more SEO oriented and good for ranking since the keyword is coming directly after the website name. Although, I use Sitename.com/123/question-title because it makes the sharing of URL pretty easy for me.
In Q2A the number in the URL is the ID for any question and not the title itself. So even if I share Sitename.com/123/ then also I'll land on the same question. But, if I would have chosen the other way and shared Sitename.com/question-title then I might not land on the same question. The thing here is, that multiple questions can have the same title but never the same ID.