I think you have slightly misinterpreted the statement. After point number 1,2,3… we will not be required to find a sum till the given index(as you’ve mentionaed in step 4).In fact ,the problem requires some preprocesing wherein we are going to store the prefix sum of the sorted array(as you mentioned)/set(as they mentioned).Both can be used alternatively so thats not an issue.
So the log(N) complexity mentioned in the editorial is the complexity for step 3(binary search).And once we have found the index at this step,we already have our prefix sum calculated beforehand and hence no need for any traversal.
Hope this makes sense.
Correct me you if you find any mistake.