Do I need a shim for the flat metal hose joint?
If one of the two interconnected joints is one of those with a groove and a O ring, it would be better to put the O ring in it and seal it better.
If the two connections are flat, they must be placed gaskets, usually with PTFE gasket.