The Baldur's Gate 3 Silent Library puzzle is a pretty simple one, though it might not appear that way at first. Just like the Thorm Mausoleum with its confusing murals, the Silent Library also poses you a riddle: What can silence the Nightsong? You'll need to find the answer to this question and whack the solution into the altar to get access to the Spear of Night—an important item for both Shadowheart and the Nightsong quest.
You can find the Silent Library on the lowest floor of the Gauntlet of Shar, along the corridors from the third Faith-Leap trial room. It might look like there's a barrier over the door, but it's just that big Librarian orb enemy in the centre of the room shh-ing everyone, which you should destroy right away if you want to remove silence and cast spells again. Otherwise, here's how to solve the Silent Library puzzle and find out what can silence the Nightsong.
How to solve the Silent Library puzzle
After you've entered the Silent Library at the bottom of the Gauntlet of Shar, after the third trial room, and beaten the Justiciars hanging around inside, you've got a puzzle to solve. First off, you'll need to unlock the big gate at the far end of the room leading into the space with the small circular altar—watch out for the traps surrounding it when you enter. If you examine the top of the altar, it reads "What can silence the Nightsong?". Activating the main body of the altar will bring up a box where you'll need to slot the answer to this question.
What you need to slot into the altar is actually a book—lucky you're in a library, huh? The book is called Teachings of Loss: The Nightsinger, and you can find it in the second bookcase along from the entrance, on the north side of the room. Be warned: this bookcase is booby trapped, so you'll want to disarm that first. The book describes how the Nightsinger—another name for Shar—is the only one who can silence the Nightsong, and therein lies your answer. Head back to the altar, slot in this book, and then head inside the vault to grab the Spear of Night.