Hello! Yes, it is possible to replace the casing of your CPU. However, there are a few things you need to consider before doing so.
First, make sure that the new casing you choose is compatible with your current motherboard and other components. Check the form factor of your motherboard (such as ATX, micro ATX, or mini ITX) and choose a casing that supports that form factor.
Next, check the dimensions of the new casing to ensure that it will fit in your workspace. Slim cases tend to have smaller dimensions, so you may need to measure the available space before purchasing a new one.
Regarding the power supply, if it is faulty and needs to be replaced, make sure to choose a new one with the appropriate wattage for your system. Look for a power supply that is compatible with the form factor of your new casing as well.
When replacing the casing and power supply, make sure to follow proper grounding techniques to prevent static electricity damage to your components. Take your time and refer to the manuals or online guides specific to your hardware for detailed instructions on how to proceed.
If you are not confident in doing the upgrade yourself, it is recommended to seek assistance from a professional or someone with experience in computer hardware.
I hope this helps! Let me know if you have any further questions.