I don't think frosting needs margarine. In fact, the idea makes me gag a little!
But the other 2 ingredients you used are great (coconut cream and icing sugar). That's how I make icing. Just put the coconut cream in the fridge until it's thick and stiff. Then mix in a bit of icing sugar, and spread on the cake. Mix in some cocoa powder if you want chocolate icing.
RE: How To Make Plant-Based Buttercream Frosting