Pain/Burn after peeing

After peeing, I sometimes get like pain or like a burn but that’s only when I wait too long to pee! What could it be? It only lasts for about 8 minutes but I just hate how it feels.