When exporting images by generating the file name from the assigned keywords, the spaces between the different keywords are also generated.
For example, the keywords "pippo, pluto, poldo" would rename an exported file with the text "pippo- pluto- poldo-".
The middle dash may vary depending on the settings in the "preferences > file handling" panel, but for this example it is irrelevant.
Unfortunately there are few limited options for managing texts
In fact, Lightroom only allows you to replace spaces with a dash or an underscore or to leave them.
The ability to automatically eliminate spaces during export would be very useful.
(In general, better text management would be useful.)
The solution I currently use is to rename the files after export with a system script or dedicated software.