The U.K. government announced up to $38 billion in fresh stimulus measures intended to boost the country’s economy as it exits lockdown, a path that is also being considered by other rich nations as they seek to prevent the economic shock of the pandemic from snowballing into a multiyear slowdown that could leave deep scars on their societies, businesses and economies.