@aliaksandr_hvoz It must be access with the help of anonymous user in author with the help of Sling Authentication and for postman also.
Postman must be giving 401 error code while making call in response. To make a call via POSTMAN it will require authorization as show below:

Below process will allow us to access servlet via postman or in public:
Under ui.config module looks for config.author folder and create file and name as org.apache.sling.engine.impl.auth.SlingAuthenticator.cfg.json
Paste below content within the file
{
"sling.auth.requirements":[
"+/",
"-/libs/granite/core/content/login",
"-/etc.clientlibs",
"-/etc/clientlibs/granite",
"-/libs/dam/remoteassets/content/loginerror",
"-/aem/update.theme",
"-/linkexpired",
"-/replace_this_with_your_servlet_path"
]
}Add an entry in sling.auth.requirements parameter.
If you want anonymous access, you have to put a '-' before the path.'
Deploy the code and test, it should work.
for more details:
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/is-it-possiable-to-enable-anonymous-access-to-a-servlet-in/td-p/656773