It is not like kids/teenager who currently visit the big porn sites like pornhub will say: "Oh I can't, let's read a book instead" They'll just get it somewhere else, private chatrooms, torrents, etc and from probably even less regulated and more nefarious sources that also serve stuff super hardcore or completely illegal.
But it will be harder for them, the same way it's harder to get alcohol if you don't have a proper ID, and just that will prevent a good number of them of accessing it or at least accessing it in a regular way.
You can show ID at a real world store and buy an age verification token. The token is good for exactly one user account on one website for one year. The website is responsible for ensuring no account sharing.
No need to store IDs online and it's still pretty hard for kids to access anything we don't want them to. Just like alcohol and tobacco there will be straw purchasers who re-sell to minors, and we accept that imperfection. We also punish people who re-sell or give alcohol to minors.