If you don't want to rely on unpkg.com, save the file to your project and serve it from your server:
<script src="/assets/vanilla-back-to-top.min.js"></script>
<script>addBackToTop()</script>
You can also install the package via npm and import it into your bundle:
npm install --save vanilla-back-to-top
import { addBackToTop } from 'vanilla-back-to-top'
addBackToTop()