What is this metal roof trim that was torn loose by a storm?
Technically it is the rake board, or the metal that covers the rake boards. It supposed to be held in place by pop rivets and/or nails and tucked under the metal drip edge that is part of the roof system. It could be reattached, but it surely dented, if not cracked where the repeated bending has occurred from all the flapping in the wind it has done. It should be replaced for best results, but could be set back in place until it can get repaired properly