Replacing the ATmega2560 microcontroller on the Arduino Mega requires some fairly advanced soldering skills. After replacing it, you will also need to flash it with a bootloader, which requires you to own an ISP programmer or another Arduino board turned into an "Arduino as ISP" programmer. Once you add up the expense of the replacement chip and the programmer, plus the time you spend on the replacement and the chance that other components on the board are also damaged, or that you will fail in the repair effort, you may find that the best choice is to buy a new Arduino board and get on with your Arduino journey.
As a beginner, you might be better off to start with a cheaper board like the Arduino Nano, Uno, or Pro Mini so the inevitable mistake won't be so expensive next time. If you get the version of the Uno with the DIP ATmega328P, you do have the option of easily popping out the ATmega328P and replacing it if it's ever damaged. On the other hand, there are other chips on the Uno which could also get damaged and replacing those won't be so easy.
With the Pro Mini, you use a separate USB to serial adapter. That means if you damage the Pro Mini, you may be able to still use the USB to serial adapter, or vice versa. It also means that you can share one USB to serial adapter between multiple Pro Minis to save money. If you get a Pro Mini, make sure to buy a USB to serial adapter that has the correct pinout so it can be plugged directly into the Pro Mini, rather than requiring a mess of jumper wires:
Once you have gotten a bit more experience and are a bit less likely to burn up boards, you can start playing with the more expensive boards like the Mega.