You do not learn surgery at undergraduate medicine level, that comes during foundation years after graduation (if you do surgery rotations) and during specialist training after that if you choose, and get onto, a surgical specialty.
The 2 degrees are very different, other than some overlap with pharmacology and possibly physiology (but I don't really know much about the degree in pharmacy). You would probably find out more by researching the course content of these degrees.