Computer issues? powers off

Hi recently my computer shuts off and it seems it happens when the side of the case gets tapped/touched. Sometimes my cat walks by and the computer shuts off. What should I check? I am also thinking about upgrading, are there any good sites where I can pick out components mb, case, cpu and have them build it and ship to me? I know I can use newegg but dont’ feel like building the pc myself.
thx