Sort Columns by XY Coordinates + Add values from upper to lower levels

Hi Niccoló, welcome to the forum,
Everyone has been a beginner at some time, you’ll get the hang of it
Start by reading this post - How to get help on the Dynamo forums and here Dynamo Primer

Here is one way to achieve what you are trying to do - you will have to adapt to your circumstances
Dig in and give it a go