Amphetamine, the most awesome keep-awake app ever created for macOS. Amphetamine can keep your Mac, and optionally its display(s), awake through a super simple on/off switch, or automatically through easy-to-configure Triggers. Amphetamine is extremely powerful and includes advanced features for those who need them, yet remains intuitive and easy-to-use for those who don't need all of the bells and whistles.
One of the feature I love is Keep your Mac awake while you pick an app is running.
Best part is Amphetamine is totally free and no ads. You can download it from App Store :