.html end of URl affected to SEO?

If you currently have /path/to/site.html and change it to /path/to/site, this will affect SEO, as search engines think they know the url (the former).

However, there are solutions to this. You can either keep the .html at the end of the URL (there should be no problem to use a WordPress permalink with .html in the end), or if you want to clean up your URLs, you need to redirect from one to the other (use 301 redirects).

There is extensive material on how redirects work (like this), if you only want the .html to disappear (and rest of the URL stays the same), something like this could already work in an .htaccess

RewriteRule ^(*.)\.html$ $1 [R=301,QSA,L]

Otherwise, you’d need a more complex structure which depends on your specific current situation.