Walgreens’ stock has struggled this year as the company cut its profit expectations and contended with a decline in Covid vaccine and test demand.