Hi Sam,
I'm afraid the answer is more complicated that you would like it to be. The first part is simple: you can do this in your tiddler
<html><script type="text/tikz">
\begin{tikzpicture}
\draw (0,0) circle (1in);
\end{tikzpicture}
</script></html>
and this results in a script element with the chosen type and text.
The problem, however, is with the lib itself (or rather with its compatibility with dynamic pages like TW). The problem is (well, at least seems to be), when the lib loads: as far as I can see, it loads once the page is loaded, and (that's my guess which is difficult to check as I can't see the non-minified source like
https://tikzjax.com/v1/tikzjax.js) searches for all the (script?) elements with type of "text/tikz"
that are on the page already, and substitutes them with SVGs. But in TW, you usually don't have this elements on the page load: instead, the are shown once a tiddler is open (even if it is among default tiddlers, this is
later than window.onload). This would work like with MathJax in
https://YakovL.github.io/TiddlyWiki_TwFormulaPlugin if the lib itself checked new "text/tikz" elements and applied its magic to them, or if it worked like KaTeX, which provides an explicit method to render these bits (
katex.render in this example), although this would require writing a plugin for this.
I guess, the only solution for tikz specifically is to ask the author if they can help (you can refer to this thread for details). Luckily, they left their contact on
tikzjax.com.
As for loading external libs, if they provide some global object to use, they can be added by inserting the script tag into MarkupPreHead, saving and reloading. But again, it's not always trivial to use some bits on a dynamic page in the same fashion as some static pages. Take for instance
https://github.com/YakovL/TiddlyWiki_DisqusPlugin: the implementation for a single thread was rather trivial (I only added a macro that reproduces what Disqus suggests), but supporting multiple threads wasn't trivial and I only implemented it somewhat quickly because it was adapted earlier to TW5.
So yeah, I can only suggest to ask about specific libs, as there's not simple answer for all of them at once.