execute as @n[type=item_display,tag=library_book_display] run function doors:interact/library/book/display
function doors:interact/library/book/give with entity @n[type=item_display,tag=library_book_display] item
kill @n[type=item_display,tag=library_book_display]
kill @n[type=interaction,tag=library_book]