Walmart’s stock fell Thursday as quarterly earnings were expected to decline for the first time in three years, with strength in groceries and GLP-1 drug sales continuing to pressure margins.