Toni Kroos has officially retired from football following Germany's elimination from Euro 2024 by Spain.