I have made this recipe for buttercream: https://addapinch.com/perfect-chocolate-buttercream-frosting-recipe/ It includes powdered sugar, cocoa, butter and vanilla. I made it according to instructions but unfortunately started with cold butter, so the buttercream came out grainy. To fix this I followed many tips from the internet instructing me to separate part of the mixture, microwave it, and then return it to the mixing bowl and mix on high for a long, long time. It's still grainy. Any more suggestions? How long am I supposed to be mixing it for? I've mixed it using a hand mixer for at least twenty minutes. Now the buttercream seems to be separating, and I can see grains of butter appearing.
If I understand your situation correctly, your frosting is not homogeneous. It sounds like the microwave fix that you have tried is aimed at softening pieces of too cold/hard butter that refuse to mix into the soft texture of the frosting. If you have already tried this pretty thoroughly, it's hard to believe the butter lumps wouldn't have softened enough by now.
So I wonder if your graininess is because the liquid (milk) and the butter are refusing to emulsify well. I was taught (the gist of) this recipe by my mother, and we are too lazy in my family to measure stuff, so this happens to my frosting all the time when I just put in too much liquid. Our fix is add more powdered sugar ...little by little of course, and sift it so as not to introduce sugar-lumps into the problem. Keep stirring it up, and pretty soon you will have a frosting with a teeny bit too much powdered sugar. It will be a little too dry. But now it should be easy to get it all blended into a smooth mixture just by mashing it against the side of the bowl as you stir. It might be a little bit too pasty for frosting, but at this point you gradually start to add in tiny amounts more of your liquid, stirring all the while, until you get your spreadable rich consistency back.
Yes, the proportions are now a little off since you have deviated from the recipe, but honestly, frosting is frosting. It's really just spreadable buttery sugar. If it works, and looks pretty, it's all good.