To avoid hurting a tree, use high-quality stainless-steel screws. These screws are rust-proof and won't harm the tree in the long run. Hammering a nail into a tree is intrusive and causes damage, as it breaches the protective outer bark layer.