The two-time Wimbledon champion twice sought treatment during the match in Germany.
Osaka sustained the injury at the Madrid Open last week.
The 19-year-old Spaniard beat Rafael Nadal and Novak Djokovic on his way to the final.
The Spaniard, just 19, dumped his countryman out in the quarter-finals and became the first player ever to beat the duo in the same clay-court event.
Alcaraz hurt his ankle in a second-set fall but recovered to win 6-2 1-6 6-3.
The Spaniard is playing his first tournament in six weeks after suffering a stress fracture of a rib.
The teenager became the first British woman to win a Grand Slam singles title in 44 years
The pair had been due to meet for the first time in more than five years.
Murray booked his spot on Tuesday night.
Murray won 6-1 3-6 6-2 to set up a clash with old rival Novak Djokovic.
Djokovic beat Gael Monfils in straight sets in Madrid before Murray’s 6-1 3-6 6-2 win over Denis Shapovalov.
The British number one struggled with a back problem as she lost to Anhelina Kalinina in Madrid.
Raducanu seemed rejuvenated after a medical timeout following the first set, but fell short in the decider.
Anderson reached the US Open and Wimbledon finals and won seven ATP Tour titles.
The 20-year-old won the opening set but eventually fell to a 2-6 6-4 7-5 defeat.