Like the other user said, this is all plain as day on the EndeavourOS wiki, but, I have something to add.
Seeing as how this is an Nvidia Optimus laptop, you will need a graphics switching utility to switch between, CPU, GPU, and Hybrid graphics modes.
The graphical way is to install optimus-manager and optimus-manager-qt. Once they are both installed, restart, and you will have a system tray icon that allows you to select your graphics mode.
The way I prefer, is to just use envycontrol, and do my graphics switching from the CLI. Mine stays connected to a monitor for gaming and is always plugged in when I’m using it, so I just set it to hardware acceleration and leave it. If I ever take it to the couch for non gaming activities I can always set it to hybrid mode with a simple command.