The German law determines that if you carry out construction works in the German territory, which means work on real estate, your client is obliged to deduct a withholding tax from your issued invoices unless you have registered at a German tax office and arranged exemption from the withholding tax (Freistellungsbescheinigung). This exemption should be effective no later than the day of invoice payment, so you can start your work and apply for the exemption at the same time.