The process of getting a library card is similar.
Fill in the application form and check your ID card (some backward places will ask for a photo).
Then charge a certain deposit, which depends on how many books you can borrow.
The other party gives you some receipts, and you can get it done.
Generally speaking, magnetic library cards are used now, and these cards can be used on the same day.
However, in some backward places, I just use a piece of paper to make a library card for you, and stick a barcode and your photo on it, which may not be used on the same day!
Libraries are public cultural facilities and are generally free of charge. Please refer to the working schedule of public institutions for opening hours.