From your description - it appears like the sync transaction has been broken thus resulting in a non working system.
Even though you used the command line and pacman - I am guessing you did so using a virtual terminal from the plasma desktop - the konsole app.
Doing so may cause the desktop session to terminate which in turn will completely break the konsole virtual terminal.
→ [root tip] [Utility Script] Check if updates may require system restart
It is possible to recover from this - if you don’t restart your system - instead attempt to switch to the real console - commonly referred to as TTY.
This is done using CtrlAltF<num> combination. Depending on environment tty1, tty2 and tty7 may be occupied - making something in between the logical choice e.g. F4 or F5.
From there you can attempt to rerun the sync command (it may be required to manually remove the /var/lib/pacman/db.lck file)
sudo pacman -Syu
Please refer the following topics for hints and advises on the topic of safely syncing your system.
→ [root tip] [How To] Update Manjaro the smart way
→ [HowTo] Updating Manjaro as safely as possible
To troubleshoot your current issue - please see