Taking items away from baby

Lately, my 6 month old cries and kicks her feet when I take away an object she’s not to be playing with like the AC remote or phone. I give her one of her toys and I explain to her nicely that the toys are much better and that she should play with it. Am I doing the right thing? Or I should just relax cause she can’t understand. I’m just trying to prevent tantrums later on. How would you guys handle this situation.