First, go to hightlightjs.org to get the latest version of package or if you want to make your own custom package with custom code. Then, take example of following code to link the files and initiate hightlightjs. (Add these code between <head> </head> tags)
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/styles/default.min.css">
Then, add the script aftertag.
After doing this, 90% of your work is done, now you just need to make the script know which part must be highlighted. Use the following example code if you want bash code to be highlighted:
<pre><code class="bash"> ... </code> </pre>
If for some reason, it is not highlighting, then either you didn't implement the code properly or not all of code can be highlighted, or you haven't added the coding language into the package.
For documentation, visit this page.
For packages, visit this page.