Jesus’s vernacular was Aramaic, a derivative of Hebrew. He was also well-versed in Hebrew due to his Jewish upbringing. It is well-documented that he often quoted Scripture, especially Psalms. It is likely he knew some Greek and Latin due to contemporary contact with those cultures, but it is not strictly documented that he spoke these languages and it can be the subject of much debate.
As for his last words, he spoke to his companions and the criminals crucified with him, likely in Aramaic. He also spent quite a lot of time quoting the Psalms. His very last words, “Father, into your hands, I commend my spirit” is from Psalm 31. It is highly likely that he used liturgical Hebrew to quote this. I suppose it is possible that he said it in Aramaic, but since Jewish worship and liturgy was always in Hebrew, that is where I would place my bets.
Supposedly “Eloi, Eloi, Lama Sabachthani?” transliterated into the Roman alphabet.
loosely translated: “My God, my God, why have you forsaken me?”
Is this saying Aramaic or Hebrew?
It’s a Greek transliteration of an Aramaic phrase. Most of the Aramaic Jesus is quoted as saying is Greek transliteration and not actual Aramaic as it would be written in the Aramaic script.
You should find this helpful: en.wikipedia.org/wiki/Aramaic_of_Jesus#Aramaic_phrases_in_the_Greek_New_Testament