Just because banning something makes it seem like forbidden fruit does not mean that a ban isn’t needed. Banning hard drugs such as heroin and cocaine does, by the same logic, create a forbidden fruit out of those drugs, but that doesn’t mean we should ignore all of the harms that they bring just so that teenagers find them marginally less appealing.
For the large majority of people, banning something does provide effective deterrence. It is quite intuitive that if doing something will get you a jail sentence or even just a slap on the wrist, an individual will be much less incentivized to do something, or at least think twice before doing something. It also means that if individuals do watch porn they will be more likely to watch porn privately and treat it as a generally taboo subject, which means there is less exposure to the existence and appeal of porn overall and less entry into a habit of watching it. Even in the very worst case, in which an individual still watches porn excessively, they can simply receive their punishment for watching it, which will mean in the long term they are still less likely to continue watching it.