Hi @goyalkritika ,
I see the URLs do not have extension, so my understanding is you have set-up vanity/short URLs. Now, regarding the error, have you checked the error logs, you should find something over there. 404 means you do not have access so if you are using any system user within your service implementation/Sling Model class, just make sure the system user has the right access.
If this does not resolve your issue, then I need some more information like what custom configurations, redirects, etc you have done along with logs.
Thanks,
Ritesh Mittal