Valve details how to open the Steam Deck to replace the thumbsticks and SSD, and explains why you probably shouldn't try this yourself.
Valve says: stop sniffing your Steam Deck
Some people love to open up their PCs to improve performance, increase storage space, and so on. Valve understands this. It knows that there will be users who want to open up their Steam Deck to swap out some components, so it has released a video explaining the basics of removing the thumbsticks and the SSD. It also strongly warns against doing so.
According to Valve, the Steam Deck was designed with specific components in mind, with no intention of user-swappable parts. However, it acknowledges that user-swappability is still possible, but that doing so could lead to all sorts of hardware issues.
For example, the SSD is specifically chosen for its location in the hardware and the components around it. Therefore, swapping it with another SSD can result in overheating, battery drain, and other issues.