you have 2 options (at least):
modify the boot image and reflash it, you need to add "systemd.unit=multi-user.target" in the bootargs
leave the boot image unmodified, boot once, and run at root shell:
systemctl set-default -f multi-user.target
Next boots will be without GUI
Note: to modify bootargs:
abootimg -i <boot .img file>
note the current bootargs in the previous output
abootimg -u <boot .img file> -c "cmdline=console=ttyMSM0,115200n8 root=/dev/disk/by-partlabel/rootfs rootwait rw systemd.unit=multi-user.target"
note that the command above modified the boot .img file. You can reflash it, and you will not boot into GUI anymore.
Make sure that the cmdline used in this example matches the one you had in the previous command.. sometimes we change them..