How to add longitude and latitude into cesium kmlDataSource without loading the file?

When you load a KML file in CesiumJS it automatically creates entities based on the data in the file.

If you already have the positions and/or geometry information, you can create your points/polygons directly with the Entity API, see for example this code example for creating polygons: https://sandcastle.cesium.com/?src=Polygon.html.

You may also find this guide helpful: https://cesium.com/docs/tutorials/creating-entities/