how to write someone singing, in a book?

One option is to describe the character's singing in detail, using vivid language to convey the sound and emotion of their voice. For example:

"The singer's voice floated through the room, ethereal and haunting. Each note soared and dipped, weaving a mesmerizing melody that held the audience spellbound."

Another approach is to use dialogue tags and descriptions to show that the character is singing, such as:

"Mary belted out the lyrics with passion, her voice filling the room and drawing everyone's attention. She closed her eyes and let the music take over, losing herself in the song."

Ultimately, the key is to convey the character's singing in a way that engages the reader and brings the scene to life.