Thank you for the information. I would start by ensuring that the terrain you generated is being added to the Cesium viewer correctly.
Cesium OSM buildings are built for the Cesium Terrain. They are not designed to adapt to any terrain added to the Cesium viewer. Thus, seeing the Cesium OSM buildings floating in the air when added to a new terrain is not a bug.
To populate your custom terrain with buildings, I suggest that you upload your desired building models to your Cesium ion account. Next, place the models in your terrain at specified coordinates. This guide will help you set the location of data uploaded to Cesium ion:
As always, more information helps me give you better assistance. Could you tell me a little bit more about your use case and desired functionality? Let me know if you have any questions or concerns!