The German government said Friday it has reached agreement on the budget for 2025 and a stimulus package for Europe’s largest economy, easing a monthslong squabble that threatened to upend Chancellor Olaf Scholz’s center-left coalition.