Hi!
There are three main branches of government. These are the judicial, executive, and legislative branch.
All of these branches work together in order to avoid just one person holding all the power.
The judicial branch focuses on deciding what laws are just, and the legislative branch legislates laws of the house and senate.
The executive branch, though, carries and enforces those laws. Another aspect to the executive branch is that this is where the president's power lies.
Supreme Court justices are appointed via the president. Those appointments are then approved by the legislative branch. If approved, those justices go on to lay in the judicial branch.
Can you see how these branches all work together? No one has full 100% power, which is how we limit the likelihood of a dictator.
Since the president appoints Supreme Court justices, and they lay in the executive branch, this means the executive branch is the branch which appoints Supreme Court justices!
Hopefully, this helps! =)