Hello @JustAskingHere
Technically yes, but you will be limited with the smaller form factor. You also have a Pentium G4400T dual core cpu, so it would not be very advantageous to upgrade with expensive parts as that cpu will most likely be the bottleneck.
As others have reported with that series, you will need to use a low profile graphics card because the 24 pin power cable is located underneath the PCIe x16 slot. Most likely, a single slot GTX 1030, unless you can find a low profile 1050 that wont be too large to interfere.
You will also have to replace the uATX 180w PSU with a Micro ATX 300w or larger PSU.
If gaming is your goal, you might want to consider saving up for a more powerful machine.
Just my opinion.