So if i print something it works great but after a few minutes it starts underextruding for no reason. Its bowden and the Motor starts slipping any idea why?

First is that there is always a reason. The problem is to figure out what it is. More details are also needed.

What printer, slicer, material etc.

I don’t have any bowden setups so no first hand knowledge but you have your clues already.

The motor starts to slip. If you mean it is grinding up the filament instead of pushing it through then that is something to look at. There is probably some restriction in the filament path. Maybe you are trying to print to fast and it can’t keep up meaning maybe it can’t melt the filament fast enough. Maybe the gear is worn or dirty and can’t grip the filament or the tension on it is insufficient.

It is a machine controlled by software. Everything it does is for a reason - good or bad.

Generally when I’m having this problem it’s because the filament isn’t melting fast enough. Either because I’m printing too fast for the hotend to keep up, or because I have the nozzle temp set too low. If it wasn’t extruding very well from the start then I’d say that’s a nozzle clog, but if it starts ok and then fails after a couple of layers then it’s probably too cold. Remember that your lower layers are typically printed slower so once it speeds up, and especially if you have cranked up the extrusion multiplier for infill (like I have) then the filament starts getting fed through the hot end much faster. That’s where a low nozzle temp will cause print failures.

Good luck!