CesiumGeoreferenceEllipsoid.SampleTerrainMostDetailed(position) It doesn’t work, or did I write it wrong。
I would like to know the API for getting elevation data for a location thank you。

Cesium for Unity does not yet have such an API. The best alternative currently is to use Physics.Linecast against the terrain. This has been covered a few times already on this forum, so have a search and ask followup questions if necessary.