Key signatures, and the order that never changes
The accidentals gathered at the start of the staff, the fixed order they appear in, and the trick that reads the key in a second.
Writing B major by marking five sharps every time a note appears is possible, and nobody does it. The accidentals that hold for the whole piece are gathered at the start of the staff: that is the key signature.
Create your account to read the whole topic
It's free: with an account, every topic opens.