https://www.freeprivacypolicy.com/free-cookie-consent

https://www.freeprivacypolicy.com/blog/google-consent-mode

This is an excellent free tool and works exactly how I would prefer to control scripts on my website – more manually defined. Ideal for small sites