Very few food products have an expiration date printed on them. A lot of them have a "Sell by" date, which is not an expiration date. We have a local milk producer that prints a "Sell by" date on their bottles. The rule of thumb is that if it's stored in proper refrigeration, unopened, it'll keep for 2 more weeks. (Plus another week to use it up.) But it's impossible to explain that people. The disgust reflex is strong, and you can almost watch it on their faces as it overrides people's rational faculties. (Honestly, that experience helps me understand the recent election results.) As a result, the store that I worked in would as a rule of thumb take the milk off the shelf 3 days before the "Sell by" date, even though it'd be good for another 3 weeks. Milk that didn't sell, we had to pour down the drain.
One time when I was working there, I had to deal with an irate customer who returned some fancy cheese hors d'oeuvres that she'd received as part of her pick-up order because the package had a "Sell by" date on it that was a couple days past. I refunded the cost of the item, and when I took it back to the cheese department, our cheese monger explained that the date was really only useful for the store to keep its stock rotated. The product didn't spoil after that date; in fact, it got better for several months as the cheese aged. But, we agreed, it's impossible to explain that to people.
So, to the question, also while working there, I made a delivery to an elderly woman whose son ordered groceries for her. She had a number of items that she didn't use before the "Use by" date, and asked if I'd take them. One of them was a container of plain yogurt. I don't use a lot of yogurt, mainly as a condiment for Indian dishes, so I didn't even open it until about a month after the "Use by" date, and finally finished it probably 3 months after. (Just don't let it warm up, open only briefly, and always use a clean utensil to scoop it out.) It still tasted fresh and enjoyable.
I still have butter in the refrigerator with a "Use by" date in 2023, because I bought a lot of it when it was cheap (on sale and employee discount), and put it in the freezer. I have eaten canned food several years after the "Best by" date. The heuristic is easy: It it smells good, it's edible. If it smells off, toss it. But I know that there are plenty of people out there with a hair-trigger disgust response, who are convinced that the moment the clock ticks over to the date printed on the package, the contents turn to poison. This heuristic probably grosses them out. Oh well, people aren't rational.