You can use the onItemReady of the repeater with the $item scope…
#repeater1 - repeater
#button1 - button in the repeater
$w.onReady(function () {
$w("#repeater1").onItemReady( ($item, itemData, index) => {
$item('#button1').onClick((event) => {
console.log(index);
});
});
});