Get uBlock Origin instead, the version written by its original creator. He broke from the original development group in order to improve uBlock to his satisfaction. Until Apple closes its extensions Gallery, the latest version of uBlock Origin is available HERE:
https://safari-extensions.apple.com/details/?id=com.el1t.uBlock-3NU33NW2M3
Sadly, Safari no longer allows installation of extensions downloaded directly from developers. That includes uBlock Origin. NOTE that uBlock Origin still works with Safari 12, despite Apple's scattershot blocking of 'legacy' extensions. You'll find it still is listed among your Safari extensions. Simply check it ON again and click through the incorrect warning that it will slow down your browser. uBlock Origin will then work fine. Also note that blockers do NOT typically slow down browsers. They actually speed them up by blocking unwanted junk and ads being loaded into web pages. The less garbage you have to download into a web page, the faster it renders. I have no idea why Apple says otherwise. I hope they wake up from their current Safari stupor.