Crossbows are better on a rogue.
Bows are better on anyone else starting with level 5, unless you took crossbow expert feat at level 4 (I am unsure whether the feat is actually in the game)
Why is that?
Because in 5e, crossbows without the feat can only make 1 attack per round. And at 5th level, most martials (rogues excluded) gain a second attack. Maybe it might be easier to understand if I broke it down like this:
Fighter at 4th level- Crossbow (without Crossbow Expert feat) 1d10 + Dex damage (1 attack)
- Crossbow (with Crossbow Expert feat) 1d10 + Dex damage (1 attack)
- Longbow 1d8 + Dex damage (1 attack)
Fighter at 5th level- Crossbow (without Crossbow Expert feat) 1d10 + Dex damage (1 attack)
- Crossbow (with Crossbow Expert feat) 1d10 + Dex damage, 1d10 + Dex damage (2 attacks)
- Longbow 1d8 + Dex damage, 1d8 + Dex damage (2 attacks)