My laptop has a bad built in soundcard which is always cracking and popping when I listen to music or use protocols or anything.
So I was wondering if an external soundcard would fix this problem?
Yes, an external sound card or DAC will solve these issues, so long as it is actually the sound card that is the issue. The digital signal is a software thing and as long as the external DAC provides good power isolation and clean output, it will be completely independent in translating the digital audio data to sound. My MSI laptop has a similar problem and I have a portable FIIO DAC that I use as an alternative sound output whenever I need good quality sound from it and it works well enough for all my recording and video production needs, let alone any other less technical uses that are worth using it for.
If, however, the issue is that the digital audio signal itself has issues, then an external DAC will still produce the same issues as they are problems with the actual signal, not the rendering of the signal. Most likely the issue (as described) is hardware though. Either way, having a decent external DAC should give a noticeable increase in audio quality unless you had pretty solid built in audio to start with.
Built-in soundcards tend to have a low quality resulting in more hiss than external cards. However, the principal problem of timely data transfer should not be sufficiently different: the internal soundcard more often than not is directly connected to the PCI bus. So while an external sound card is usually a good idea at the latest when you also want to record stuff, it is well possible that it would not definitely cure your current problem.
Are you using ASIO drivers? Assuming you use some version of Windows (my default assumption when people think that giving no information at all about the system should be sufficient for others to figure out what is wrong on their own).