> - through UART
The usual way, via ISP, or with a special bootloader.
ISP mode is entered when specific levels are applied to certain pins at startup. A ROM-based bootloader for erasing & Flash programming is exectued. Details are described in the datasheet.
The software required on PC side is available from NXP, I think for free download.
Arduino and other environments usually come with proprietary bootloaders, geared towards their proprietary application interface.
> - trough SWD with a probe like this 2548 Adafruit Industries LLC | Schede di sviluppo, kit, programmatori | DigiKey
You realize this is a ST-Link, designed by ST mainly for their STM8 and STM32 devices, do you ?
You would first need a toolchain that supports both the LPC8xx as target, and the ST-Link as debug interface. A few do that, but these toolchains are not for free - like Keil uVision or IAR Workbench.
That might work, but it is not very likely.
I tried that once with moderate success, some years ago. At least I could step into the code with the debugger.
However, I suggest to get an eval board for the LPC8xx MCU you want, which usually come with an integrated debug pod (LPC-Link). With the proper toolchain (like MCUXpresso), this will work out of the box.
The MCUXpresso toolchain can be downloaded for free. The one caveat is, only LPC microcontrollers are supported.