Rafters. Joists if you’re going to put a floor above
Wait - if you’re talking about what would normally be the tip of a framed wall, then that’s called a Top Plate, usually doubled.
Third edit: Since it’s above a door and spans an opening it’s called a Header or a Beam, respectively.
Gawd, I...