There should be a clear distinction if the product has an Use-by date or Best-before date.
Use-by date - Foods like fresh yogurts or meat have usually an Use-by date. Products that have this indication should be eater until that date, but not after. After that, it can be unsafe to eat or drink it, even if it looks fine. You also shouldn't cook it, or freeze it.
A shop should never include products with an expired Use-by date in your basket!
Best-before date - or BBE (Best-before end) indicates that the food is still good and safe to be eaten, although its quality may not be the same. The flavour and texture of these products may have changed a little bit and might not be as good as before. But these foods are still very safe to eat!
This type of dates are usually on products that can be stores for a long time like frozen foods and dried foods, for example. So, it is possible to have sometimes this kind of products in your basket 🌷