"Used to" implies two things at once:
You have done something more than once but do not intend to repeat the action in the future (you have stopped doing it completely).
The time elapsed since you have done something is significant (as @FumbleFingers points out, this is typically months or years).
And while you certainly can add a reference to time in many instances, it often isn't necessary since you are discussing things you are no longer doing.
Note, however, if you do add a description of when you "used to" do something, it should generally cover multiple occasions.
I CANNOT say "I used to surf the internet when I was on a bus yesterday", because a bus journey is a short period.
The last time you surfed the internet while taking a bus (yesterday) isn't far enough in the past. Also...
You may or may not repeat the action in the future:
"I surfed the internet when I was on the bus yesterday."
A significant period of time has elapsed, you have done this before and you do not intend to repeat the action:
"I used to surf the internet when I was on the bus."
Specific vs. Multiple Time Frames
Note that the phrases in brackets [...] serve to clarify the time frame when these events occurred.
"I surfed the internet when I was on the bus [yesterday]."
"I used to surf the internet [when I was on the bus]."
But I CAN say "I used to surf the internet on a bus [every day] [three years ago]".
Perhaps yes, but a better phrasing might be e.g.
"Up until three years ago, I used to surf the internet on a bus every day."
"Back in 2010, I used to drink coffee [every day]."
"We used to go skiing in the holidays l̶a̶s̶t̶ ̶y̶e̶a̶r̶ ̶".
Arguably, "last year" is too specific. It's also redundant:
"We used to go skiing..."
"... In the holidays."