Building my own on-off button for a PC
Yes, a switch contains conductive parts that contact or separate according to how the switch is designed and operated.

The PC power switch creates a conductive metal path between the wires while while it is pressed.

If you can duplicate that sort of thing you can make a power switch for your PC.