You can opt-out of having your site activity available to Google Analytics by installing the Google Analytics opt-out browser add-on. The add-on prevents the Google Analytics JavaScript (gtag.js, analytics.js) that run on websites from sharing information about your visit activity with Google Analytics.
Using the Google Analytics opt-out browser add-on doesn't prevent site owners from using other tools to measure site analytics. It also doesn't prevent data from being sent to the website itself or in other ways to web analytics services.