The power to impose reasonable restrictions on free speech for the purpose of decency and morality (including obscenity) arises from:
\[\boxed{Article 19(2)}\] Article 19(1)(a) guarantees freedom of speech. Article 19(2) allows the State to impose reasonable restrictions on grounds of:
decency,
morality,
public order,
defamation,
security of the State,
contempt of court,
incitement to an offence, etc.
Obscenity laws, including those under IPC/BNS and the IT Act, derive constitutional legitimacy from 19(2).