The Germans, three-times winners, will kick off the one-month tournament in Munich on June 14th, with the final on July 14th in Berlin's Olympic stadium.
The draw was held at the Elbphilharmonie concert hall in Hamburg, one of the 10 host cities of the tournament.
"It's no group of death but a very strong group and we are looking forward to it," Germany manager Julian Nagelsmann said.
The hosts appointed Nagelsmann as manager in September after parting ways with Hansi Flick following a 4-1 home defeat by Japan, their fourth loss in five games.
They beat France under Rudi Voeller, but after Nagelsmann began with a win over the United States, they lost against Turkey and Austria.
"I am optimistic that if we do some things in the coming few months then we will play a good Euro. The first game also has a special kind of pressure," said Voeller, the national team director.
"We still have some problems but I am convinced that Julian Nagelsmann will do it," Voeller added.
Italy defeated Spain on penalties in the semi-finals on their way to winning Euro 2020, but lost 4-0 to the Spanish in the 2012 final. Croatia reached the semi-finals at the last World Cup.
"Yes, it could have been better," Italy manager Luciano Spalletti said.
"Being in the fourth pot makes you realise that you have teams ahead of you but nothing should distract us from the fact we are Italy.
"A tough group, Albania showed that they know how to stay on the pitch. Croatia is strong and experienced. Spain? Anyone who loves this sport must play it, the taste if challenge and comparison." Spalletti added.
Spain vs Croatia
Spain's opening game is against Croatia, before they take on Italy.
"If it's not the toughest group, it's one of the toughest," Spain manager Luis de la Fuente said.
"Italy are European champions, Croatia always reach the later stages and although they are not at their best, they are two historic teams. And don't forget Albania, top of their group."
"The Pot 3 team we’ll be facing are The Netherlands… We won both our games against them but it makes our group harder. We also faced Austria during the latest Nations League campaign and it was far from easy. It’s a dense and difficult group," France coach Didier Deschamps said.
England, beaten finalists in Euro 2020, are in Group C alongside Denmark, Slovenia and Serbia. England, who needed extra time to see off Denmark in the 2020 semi-finals, start the tournament against Serbia.
"You look at Serbia with a centre forward like Aleksander Mitrovic and then you have to be careful not to assume anything when you see these draws, that's for certain," England manager Gareth Southgate said.
"You can look at it on paper but the games aren't played on paper. There are some teams that you are glad to avoid in Pot 3 and Pot 4 but all of the teams that we play are more than capable."
The top two in each of the six Euro 2024 groups proceed to the round of 16 along with the four best third-placed finishers.