The landlord may sell the rental property at any time. But your rental contract continues as usual. The new owner becomes your new landlord and automatically takes over your rental contract. You don't have to sign a new rental contract. You don't even have to change anything in the contract.
The new owner will provide you with the new contact and payment details. From then on, you have to pay the rent to the new landlord. You don't have to do anything for this yourself.