How to adjust all items in a list to be equal to the current cells index, in a repeating group?

Hello,
So i have a small problem. I have a repeating group filled with a list of cards. These cards have a “position number”, which is how its sorted by, 1->2->3 etc.
I implement some drag and drop, but essentially after dragging it, how can I make all of the list’s position number be equal to the index its in for that row. For context this is 1 column and multiple rows cell.
I tried using make changes to a list, however it sets all items position number to be equal to the same value, instead of the cells index its in.
Does anyone have any idea on this?