First check which version of edge you have on your computer, then check the version of the edge selenium driver, generally the selenium driver for your browser need to match or be very close to the version number of your browser. as an example selenium driver for chrome that has a version 97 wont work with a chrome browser that has a version 98. I have seen a lot of weird errors that were caused by version mismatches between the browser and the selenium driver.