There are many ways to do this. One of the easiest ways is to use the Windows 10 inbuilt Battery saver mode. For more tips, you can read this article.