I haven't used Windows regularly in 10 years, so I'm not completely up to date with some things, like changes to the names of things and specific directions of how to navigate, so I'm relying on the internet for information.
For the desktop application, the first thing would be to check out the Start Menu > Control Panel > Programs and Features to see if it is showing up as still installed. Not showing up there doesn't mean there aren't files left behind from the original install that could complicate things when trying to install a new version, but if it does show up you could try to uninstall from there. When 'Programs and Features' isn't showing it as installed, try installing the new version. If anything happens that you didn't expect, or things you expect don't happen, or get any errors, you can post them back here for more specific help.
One wrinkle I found to this was a Reddit post saying the program was running in the background but they couldn't find it. I'm guessing here that it is possible for it to run at startup but have the icons/buttons go missing. So it would appear like it had been removed when it is actually running in the background, yet you wouldn't be able to access it or reinstall. You could try doing what they did ("use search spotlight to get to activity monitor, then force quit from there, then you can uninstall"), and hopefully this will allow you to install once the program stops. Here is the link:
https://www.reddit.com/r/Grammarly/comments/q76a8i/help_uninstalling_current_version_of_grammarly/