So to spend those amounts in change address, do I have to sign the txs using the PK of m/x'/y'/z'/1 or m/x'/y'/z'/0?
Keys being derived deterministically doesn't change the basics of how bitcoin works. If a certain key receives some coins
the same key has to be used to spend those coin, doesn't matter how you created that key.
If so, are m/x'/y'/z'/0 addresses just for receiving and m/x'/y'/z'/1 addresses just for sending?
Thank you for the help
All addresses are exactly equal. The wallet (internally) categorize them for convenience.
Usually user chooses an address amount "receiving addresses" for example at m/x'/y'/z'/0/0 and receives some coins in the corresponding address. Then moves to next address m/x'/y'/z'/0/1 to receive again, and so on.
When the user wants to spend they spend the same coins using the same key (m/x'/y'/z'/0/0 and m/x'/y'/z'/0/1) but they send all the leftover to an address created by a new key like m/x'/y'/z'/1/0 then next spend's remainder goes to the address created from key at m/x'/y'/z'/1/1 and so on.