When the rain water passes over the copper flashing, a little copper gets mixed into the rain.
Which acts as a poison to the moss
and algae. The copper will change color to a green-like grey, but that’s a lot better looking than all that moss and algae!
The trick is to put the flashing under the tab of the shingle as far up the roof as you can. You can use a roofing tar and a few nails about every 32 inches apart. Making sure the flashing lays as flat as it can.
It’s always a good idea to run it the total length of the roof, why not, you’re up there anyway.
Besides copper, you can use zinc coated flashing but it may be harder to find in the stores. All flashing can be found at any home center.