The thing with serialized books and comics is that they dont really get a rating, at least not around here. They get a 'suggested for' age thing, they wont ask 'bout your age or anythin but you get the idea, a 6yo kid buying a splatter or eroge suggested for 16 or 18 is gonna be sus.
Libraries might age restrict certain media, I couldnt borrow some of the Star Wars Legacy Comics cuz I was 15. But they can do that, they own em.
Eroge and Doujinshi sold at cons an stuff are age restricted, but since those're usually sold by their creators they understand when a teen just wants some fresh material, hopefully they're conscious enough not to sell to Kids.
Stuff you stream or get from a distributor like Crunchyroll, Netflix or Steam is age restricted as well, not that anybody's ever given their real age, you wont be allowed to access stuff over your given age.
The thing with mangas and anime in JP can vary, most are sold weekly or monthly in Magazines, in different categories, usually age or gender, weekly shounen jump, jump sq, that stuff. Similar to the first case of buying smth in a shop, nobody's gonna bat an eye if you look like it but a kid wont get an eroge.
As for animes, it's pretty much the same, stuffs age restricted or the likes.