On my Pi 4 I personally use web transmission and followed this (https://www.addictivetips.com/media-streaming/kodi/install-transmission-raspberry-pi-torrent/) guide but I will also link a guide for deluge here (https://pimylifeup.com/raspberry-pi-deluge/) I’m not sure it will work as I haven’t tested it but should do deluge looks better the interface but I don’t think you can insert magnet links in it as with transmission you can
I’d recommend Transmission