Uses the injection molded M18 terminal blocks you find on aliexpress. I left the block unretained so it's up to you to suit it to your needs. Glue would probably work. https://www.aliexpress.us/item/3256807387449540.html?
If you want a good M18 to 12v buck, this one actually has proper low battery disconnect at 15.6v https://www.aliexpress.us/item/3256806656977878.html
The author remixed this model.
Modified to fit the injection molded battery terminal