This repo has codes which explains how to protect NTag213 with new password and protect read/write from unauthorized access
Data sheet -> https://www.nxp.com/docs/en/data-sheet/NTAG213_215_216.pdf
Library used -> https://github.com/miguelbalboa/rfid
I found above library widely used by developers and worked perfectly in my usecase. Million thanks to the author.