Yes...if you know what you're doing.
I have upgraded various family members "store bought" computers...and it's always a pain, btw, because the store bought guys ALWAYS "lock you in" to THEM and THEIR services when you buy it. I bought a 'cheap-o' temp computer from Staples for about $900. Only had to last me a couple months. I needed to install an SSD to have all my data. That's an "Open case, plug in to cable, close case" operation. BUT...there was a sticker over the case that said "If you break this, your warranty is null and void". So they wanted me to take it to them, pay them $120 for "service of adding new hardware", and then wait 7 to 14 days to get it back. LOL! I ignored that and installed it myself, obviously. ... ... Point is, if you are comfortable installing hardware, software and doing basic trouble shooting...then buying 'cheap' and installing parts as wanted/needed is a viable option, but at that point you're better off just buying all the parts and building it yourself.