What did you notice?

The switches stayed the same. The wiring changed.

When the switches sat one after the other, electricity had to pass through both. If either switch was off, the path was broken.

When the switches sat side by side, electricity had two possible paths. If either switch was on, the current could reach the bulb.

Same two switches. Two different rules.

The arrangement decides which conditions turn the output on.