Why does one Key Signature mean that it can be both Xmajor and Yminor?
Because they're related. Relative Majors and Minors.
Here's what Wikipedia says. It's completely accurate but sounds way more difficult than it is.
"In music, relative keys are the major and minor scales that have the same key signatures (enharmonically equivalent), meaning that they share all the same notes but are arranged in a different order of whole steps and half steps. The relative minor of a particular major key, or the relative major of a minor key, is the key which has the same key signature but a different tonic." https://en.wikipedia.org/wiki/Relative_key#:~:text=The%20tonic%20of%20the%20relative,below%20its%20relative%2C%20C%20major.