Craft CMS with local and flywheel setup?
The .dev connection gives me an error


Don't know if it'll solve all of your problems, but .dev is no longer a valid TLD you can use for local testing since Google made it public: https://domains.google/tld/dev/

Change it over to something like .test instead.