It sounds too simple to be true, but try it and you’ll be a convert.
Add butter, lard or bacon drippings to pan and heat over medium heat. Add in can of refried beans, including any liquid. Stir together.
When warmed through, add the dairy and continue to heat, stirring now and then, until desired thickness is reached, a minute or two.
Find it online: https://frugalhausfrau.com/2015/04/30/canned-refried-beans/