Check out example codes for ".net core worker service windows". It will help you in understanding the concepts better.

Code Example 1

Host.CreateDefaultBuilder(args)
    .UseWindowsService()

Learn ReactJs, React Native from akashmittal.com