If your frosting is grainy, it means that the cream cheese wasn’t fully softened before whipping. Beat it on high for a few minutes longer, which will help smooth out some of the lumps (and remember, it will still taste delicious, even if there are a few lumps!).