Hi @Gokul5 I hope you are well!
It's your home, so if you want to lock some cupboards up you can. Always good to leave some space in case guests want to hang anything up or unpack a little bit.
In terms of locks etc it depends on how safe and private you want the contents of said cupboards to be- some hosts I work with use cable ties to seal cupboards closed, (yes the guests could just cut them off, but it shows that they're off limits) some install locks with keys, some a small metal chain with a mini padlock.
Best wishes
Paul 🙂