Oatmilk contains fat. Fat goes bad if it's not kept cold.

Also oats have starches that breaks down into sugars that bacteria loves. I sometimes eat oatmeal cookies dipped in milk. I rinse it out, but I can't always get the oats of the rim properly that way. Next day it smells riiiipe. And, no it's not the milk doing it.

Basically it goes bad for very similar reasons milk does.

Is those 10 days necessarily a deal-breaker though? Nope. There's no reason it can't hold for longer. The best-by-date is recommendation they put on there because people in this day and age for some reason can't smell and taste the product first. Instead lawyers get involved. So they put a date on. And people slavishly follow that number.

I've had opened milkcartons survive in the fridge longer than 10 days past use-by date. Think 3 weeks is my record. Something silly like that. I've had milk that has been bad even before the best-before date too.

The day you pour the (oat)milk into coffee and it "cuts" is the day the (oat)milk went bad. Also smell it. Taste it first. You will be able to tell.