As long as it’s cooked thoroughly it will be fine. After cooking, it will keep for a few days in the fridge. All the bugs will be killed and use by date won’t make a difference. The use by date doesn’t mean it should be all eaten by that date, for a product that is going to be cooked. It’s different for pre-cooked, chilled products but there’s still some leeway.
Just ate some sausages for lunch that were meant to be used by 1st June?. Husband cooked them and we didn’t notice anything wrong. We’re both retired microbiologists, but might be very retired soon if we keep eating out of date food!