STL files do not have a dimension stored in them, it may happen that the slicer expects different units. Let me share an article and an older forum post about this case, I hope you will find them helpful:
In the meantime, if you are exporting files for 3D printing, please use 3MF format. It has fewer possible file issues and can store important data like measurement units while STL transfers only the geometry in a quite old format.
My bad! STL format transfers the geometry in a unitless format which can be a problem if the slicer automatically expects these units to be millimeters for example. In some cases there is no option to change the expected input format, so with this unit option, the coordinates are scaled according to the set unit to make sure the dimensions of the imported geometry will match the dimensions of the original geometry.
3MF does not have this problem as it transfers several other info, like the applied units of the geometry.