The German football federation said Julian Nagelsmann’s deal runs until July 31, 2024, after the country hosts Euro 2024.