You can learn how to do it by following our guide here. It must be done using iCloud or an external hard drive. If you want to keep all of your Mac’s data to the new SSD, you must first create a Time Machine backup.
How to Replace Hard Drive in MacBook Pro