Germany coach Julian Nagelsmann has extended his contract with the national team by another two years through the European Championship in 2028.