I finally stopped calling people by the wrong name at parties around 2019
For years I just guessed and hoped, which led to calling my neighbor Greg "Gary" for 8 months until his wife corrected me at a barbecue in Ann Arbor. These days I repeat the name back right when we meet, like "nice to meet you, Doug," and it sticks way better. It feels a bit odd the first few times but nobody has looked at me weird yet. Does the repeat-back trick actually work for you, or do you have a better one?