While a 940MX is kind of low-end for running more demanding games, it is still better than Intel's integrated graphics, and I would expect it to run something like Fortnite reasonably well, provided you reduce the settings and resolution to some extent.
Do you happen to know what resolution the screen is on the laptop? Based on the page you linked to, it appears to come in 1920x1200 and 3840x2400 (4K) versions. The 4K version might offer sharper text and graphics in desktop apps, but that resolution is far too high for running most modern games on nearly any laptop, so if you have that screen, you would definitely want to go into settings for your games and lower the resolution to something like 1920x1200 or 1280x800 (or a resolution around those values).
Even if you have the 1920x1200 screen, you might want to try lowering the resolution in games, or adjusting the resolution scaling to reduce resolution while keeping the interface sharp, in games that provide that option. For example, in Fortnite, you could optionally change the "3D resolution" to something like 75% or 50% to reduce load on the graphics at the expense of making the visuals a bit blurrier. And of course, you should try lowering the other settings as well, though you can probably keep some settings like texture quality and view distance turned up.
Also, you should plug in the laptop's charge cable before you start gaming if you want optimal performance, as often laptops will switch to the slower integrated graphics hardware when on battery power to increase their run-time.