Upvote:1
As both flights are with BA it might be possible to get your luggage transferred to the new plane for you and you might be able to stay in the airside part of the airport. There is transport between the different terminals, just follow the signs for them if you do not need to go through passport control.
When you are in your departing airport, ask the staff, (even when you have already checked in,) as they might be able to arrange it for you.
As you likely not be sure about being able to stay airside, arrange everything as if you will have to go through immigration.
You have not mentioned your nationality, (if you add it, I will edit this answer,) so I assume you are either US American or Austrian (or other Schengen European.) If so, you will need your passport but do not need a visa. If you are another nationality, check out, many need visa for short term entry into the country for airport transfers or even for airside transfers.
If you cannot get your bags checked through, you will have to go through passport control, pick up your luggage, go through customs (the red and green lines for something to declare) and take the tube to the other terminal and be on time to drop of the luggage before the close of the check-in period. Two hours should be enough for that, if you have more it is better.
As you will need to fill out the Locator form, if they ask for an address, enter the airport and mention you are flying out the same day.