Once you've created a library and want to start inviting students, the easiest way is to click on Show invite code for others to join link that you'll see in the centre of the screen, just below the toolbar.
Here's the whole process explained for inviting students to join your library.
I can't see a code?
If you don't see the link to show the invite code at the top of the library, this might be because you are not the owner of the library. Perhaps you are in someone else's library? Go to the Teacher Dashboard and check if you are the owner or if it's a library you joined.
If you become a co-teacher of a library, you will then be able to share the invite code.