Prove you didn't damage it yourself. If so, you should solve the problem yourself.
It is the neighbor's responsibility to find out the cause of the water leakage upstairs. In order to find out the situation, the damaged owner can ask the house quality inspection department to identify the cause of water leakage and how to maintain it.
See if the house is still under warranty, because the newly bought house has a waterproof warranty of 5 years and a pipeline warranty of 2 years. If the house leaks, that is to say, it is not man-made, and it is still within the warranty period, the developer will bear the corresponding responsibility. Of course, if there is water leakage on the top floor, it must be repaired by the developer or the property management company, and the expenses will also be borne by the other party.