This is all a bit confusing to start with but it works once you get your head around it.
If your slicer software allows you to specify the unit then it is simple but if you have software that is set, you need to watch what you are doing.
One slicer I use is Upstudio and the only choice you have with it is mm or inch. So you need to export your stl as mm or inch, which means you need to set the model units as mm or inch for 1 to 1.
Once you know what your slicer uses you can output as needed.
So for this slicer I can model in m but set the web units to cm and a 1m cube will open as a 100mm cube.