Mostly this is a matter of style. Trackbars can show tick marks so it's easier for the user to select exactly the right value, particularly if there aren't too many values (a dozen or so). ScrollBars don't show the tick marks.
A Trackbar's height is fixed and a ScrollBar can be as narrow as you like so they can take up less room.
You can set a ScrollBar's Minimum and Maximum to span a large range, when the same range would look bad if a Trackbar displays its tick marks. That lets the user select a bigger range.
For both controls, you usually want to provide feedback like a label showing the current value to help the user know what is selected.
Personally, I don't like the appearance of the Trackbar and the fact that it's so big, but you can decide which you prefer.