This shouldn't happen, but it's not easy to solve the problem. It's guesswork and trial & error.
• The very first question that comes to my mind is whether you might have transferred content like system, plugins and applications to your new computer using Migration Assistant? This is one of the main reasons why users get problems.
• What is your I/O buffer size? Increase it.
• What sample rate are you using? What sound card are you using?
• How is your external drive formatted? How much space do you have on your internal and external drive? Is the drive fast enogh? Is the connection fast enough?
• Is Logic running natively or in Rosetta mode?
• What plugin are you using? As an example, pitch-related plugins eat more cpu than a compressor. Are all installed plugins up to date?
• Do you have other programs open at the same time?
• Open Activity Monitor to monitor the consumption of computer resources by Logic and other processes
You can switch to Low Latency Mode while redording, don't forget to disable low latency mode while playback.