>>114110Practice, but also unironically confidence. It sounds like a meme, but the less you feel like you need approval from the people you're talking to, the more naturally it will come. (Provided you don't circle back around to just being a jerk or something, of course.)
Unfortunately it's a vicious cycle - if you're alone and lonely, every conversation will make you feel nervous. If you've got some trusty friends and are well-practiced at casual conversation with strangers, it becomes a mundane event and you just stop caring, and as a consequence you literally become better at it.