Framer has unfortunately restricted their cookie banner feature to their more expensive plans, which currently cost $40 per month or more.
In response, I created a free version of a simple cookie banner.
If you want the option to load Google Analytics code only when a user accepts the cookie policy, consider grabbing the Professional version.
You can see it in action (disable ad blocker). → here
DISCLAIMER: It is your sole responsibility to ensure that cookie handling aligns with the regulations applicable to your project.