How should I enclose them correctly?And I agree with James that this is definitely not a suitable way to terminate cables in a ceiling void.
The rose which has been removed acted as a junction for the pendant which hung below. These terminations need to be suitably enclosed and consideration given to earthing requirements of the replacement light fitting.