This is only possible for the latest generation models.
First, power of the device and unplug from the power supply. Make sure the device is powered off and not in sleep mode or hibernation.
Once this is done you can remove the plates in the back of the device by gently removing the screws. Once this is done, you can gently remove the component and replace it with your own.
NOTE: Please use only use parts that meet the specifications of the slots:
- SSD: PCIe Gen3x2 M.2 2280 NVMe
- RAM: DDR4-2400 SO-DIMM