why is this off topic?
question text is
How can I delete messages for everyone after several hours in WhatsApp?
Whatsapp is, broadly speaking, a web service.
Whether a web service has a particular feature natively and independent from your client is off topic on Super User per What topics can I ask about here? page:
not about …
websites or web services like Facebook, Twitter, and WordPress,
There may be desktop clients for Whatsapp that do support deleting messages and whether they allow deletion after a particular time is a something you should first check for in your clients documentation.
When asking for help with client applications you should be specific and tell us what client you are using. Only "desktop" clients are on topic at Super User so your question would have to be about the client and not the broader web service. "How do I use <this client feature> to achieve X?" would be on topic here. "Does this feature exist in Whatsapp?" implies the entire ecosystem and is both too broad and about the service rather than any specific application.
Other places to look, depending on your question focus:
In all cases you should have a good idea that your requirement is something that should be available in the client to begin with. You should be able to demonstrate a minimum level of research and awareness that the feature is there, but that you are having trouble using or accessing it.
If your question is specific to the underlying web service then you may be better off contacting Whatsapp Support.