The native <input type="range"> gives keyboard support (arrows to nudge the value, Home/End for min/max) and screen-reader semantics for free, so it's worth preferring over a custom build. If you build your own, give it role="slider" and keep aria-valuenow/min/max updated live.
The difference from a stepper (a numeric input) is precision. A slider is good for a quick "about here" scrub; a stepper is better when an exact value like "37" matters. Volume, where the precise number barely matters, suits a slider; age or quantity, where any drift is wrong, suits a number input.
It's also easy to confuse with a progress bar, but they're opposites: a progress bar is read-only output the system computed, while a slider is input the user changes.