check this technet discussion the guidance is very well explained:
How do I Assign the Log on as a service user right to NT SERVICE\ALL SERVICES with THIS group policy editor?
https://social.technet.microsoft.com/Forums/en-US/5cd2106f-47e0-4079-ae3b-5d3178c5d95e/how-do-i-assign-the-log-on-as-a-service-user-right-to-nt-serviceall-services-with-this-group-policy?forum=winserverGP
More explanation:
Configure Windows Service Accounts and Permissions
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-windows-service-accounts-and-permissions?view=sql-server-ver15
Hope this helps with your query!
--If the reply is helpful, please Upvote and Accept as answer--