How does the relay board work?
When our relay board receives a 0-V, logical 0 signal from the “IN” pin, the NO and COM outputs are short-circuited. If you want it to work the other way round, it is sufficient to use the NC output (normally closed) instead of NO (normally open). Relays can be operated with a mains voltage of 220 V. However, if you have no experience, you should be careful.
Circuit diagram of the motion sensitive Raspberry Pi relay board: