I try and avoid gun oil. It’s good for metal to metal parts, but degrades any rubber/silicone rubber parts it comes into contact with so it will significantly shorten the life of magazine valves, hop rubbers and other ‘o’ rings.
The problem is it is very difficult to avoid getting any oil you use on the moving parts over all of the parts in the mechanism. The action of the bolt/slide is very good at ensuring that however careful you are when putting the lube on it ends up with a fine layer over all the parts including the silicone rubber ones.
If you do use gun oil it’s not going to immediately break your gun, but you will get a much shorter lifespan from the rubber parts than someone who used a silicone based oil. It up to you to decide if this trade off is worth the increased protection/performance it offers on the metal to metal parts.