Either
npx electron --no-sandbox .
or else
sudo chown root:root node_modules/electron/dist/chrome-sandbox && \
sudo chmod 4755 node_modules/electron/dist/chrome-sandbox
# check
ls -l node_modules/electron/dist/chrome-sandbox
# shows permissions starting with -rwsr-xr-x and root as the owner.