Running the command /summon minecraft:tnt ~ ~ ~ {block_state:{Name:"minecraft:lectern",Properties:{"has_book":"true"}}} will create primed TNT that looks like a lectern, but there is no book visible despite the state explicitly being set as such.
You can run the command /data get entity @n[type=tnt] to verify that the state is indeed set correctly.
Compare the command /summon minecraft:tnt ~ ~ ~ {block_state:{Name:"minecraft:enchanting_table"}} which creates an enchanting table primed TNT, and a book is indeed displayed in this case.
Thank you for helping us improve Minecraft! We saved your files: