If you have the Terrain Tiler asset, enable the Stitch Mesh With Neighbors option.
Generate tileable terrains from the Terrain Tiler component first, then generate meshes from the Mesh Terrain Builder component.
All the terrains connected to each other will be converted to mesh terrains and seamlessly stitched together.
* Note that only the terrains that are active in the scene will be processed.
If you don't have the Terrain Tiler asset, just add the Terrain Tiler component to the terrain game object,
then generate the mesh terrain from the Mesh Terrain Builder component. The terrains will be converted to mesh terrains and stitched together without smoothing.