Firstly, the dashboard already has a htmlheadbody - dont enter these in the template node.
Next, to make xterm.css and xterm.js available to your dashboard, you need to "serve it up". That could be done by putting the necessary files in a static folder or use the http-in~http-respnse nodes to create an endpoint to serve them.
This is for server side not for client side.
But since you have found the settings.js file - read through it - you should see httpStatic - that is where you can host files (somewhere you could dump the required files & make them available to the dashboard).
Search the forum for "httpStatic" and read the docs
If your settings.js file contains httpStatic: '/home/pi/JQuery/',
And you have restarted Node-red after editing it,
And that directory contains 123.png:
Then you should be able to see the image at <IP Address>:1880/123.png
Yes, looks like attach literally just attaches the xterm interactions to a websocket. With a matching listener in node-red, you will get the data back from the browser but will still have to do something with it.