The four you mentioned:
Sheldon has restraining orders from his heroes Leonard Nimoy, Carl
Sagan, and Stan Lee, as well as television scientist Bill Nye.
These are mentioned in the episodes The Excelsior Acquisition (Stan Lee), The Vacation Solution (Carl Sagan), The Bath Item Gift Hypothesis (Leonard Nimoy), and The Proton Displacement (Bill Nye).
This is confirmed by this specialized entry on bigbangtheory.fandom.com.
But there could follow more, of course.
The reasons for the other two restraining orders - besides the ones you mentioned - are not made clear.
The only time he mentions Carl Sagan's, is in The Vacation Solution, when he walks in on Amy with freshly washed glassware and tells her
Here you go! This is now the only lab with glassware washed by a man
with two doctorates and a restraining order signed by Carl Sagan.
And the only time Nimoy's is mentioned, is in The Excelsior's Acquisition:
Sheldon: I’ll tell you where I’ve been. You boys may have had gelato
with Stan Lee and gotten autographed comics, but I saw the inside of
his house and got an autographed application for a restraining order.
Sheldon: Plus, I get to hang out with him again at the hearing. This
is going to look great hanging next to my restraining order from
It probably - and this is pure conjecture - involves his enthusiasm concerning these idols of him mixed with his social ineptitude getting the better hand of him.