To reach level 30 enchantments, you’ll need to max out the enchantment table. You do this by placing 15 bookshelves around the enchanting table. You can fit 13 around the table by forming a circle with one gap for you to enter and leave through.
The remaining 2 bookshelves can be stacked on top of the others.
Another way to get 15 bookshelves around an enchantment table is to place a row of bookshelves on either side of the table. Of course, you have to leave one block between the bookshelves and the table.
You can put 4 on each side and then double stack the rows. This will give you 16 bookshelves if you do it evenly, which is 1 more than you need. The extra bookshelf won’t give you any additional levels, but it will make the arrangement look neat.