What is the correct way to export SVG in order to convert to STL?
Considering the simplicity of your sample design - i.e. basically only two different Z-levels, easily distinguished by color - I'd recommend one of the online image-to-3D model converters.  Here are two I've used now and then.  You may have to save your image as png or jpg instead of svg.

selva3d   and 3dp.rocks