Roof

On a car or truck, it’s calledΒ a roof. However, it can also be called a top, especially with convertibles.