Datasmith in 3DsMax 2023 does not export Substance Materials to UE5

We do not support substance material in the exporter. we support to some extent, VRay, Corona, Mental Ray, Arnold.
You could try to convert to “Physical Material” in Max before exporting to UE
image