if you wanna teardown your laptop,maybe it would be helpful,by removing all the screw and recheck the keyboard connector and the key itself,and reclean it may help,
maybe there r dust and water stuck into the keyboard itself like what im does last year with my xps.
using external keyboard seems help,but it wont do anything when the internal keyboard are messing up or ghost-pressing/keyboard ghosting occur.
if you wanna change it by yourself,be careful of the internal cable thats connect the trackpad,and another things,anyway the keyboard itself was cheap to buy at the online store,just type your laptop type like "dell xps 2018 keyboard".
if you just covered by warranty,call the tech support,but make sure theres no water damage,cz...