There are, in fact, two types of QR Codes - Static and Dynamic. Static QR Codes are more preferred for one-time usage, like voting on Google Forms, event advertising, news of the day, and topics that have relevance for a shorter period of time. The information behind static QR Codes, once printed, cannot be changed.
In the case of dynamic QR Codes, you can update the information behind the QR code anytime, without recreating it. For library book updates, dynamic QR Codes can be used.