"Avraham came to eulogize Sarah and to cry over her." (Genesis 23:2)
The Talmud (Moed Kattan 27b) says that the first three days after a person’s death are reserved for crying, and that eulogies are appropriate for up to seven days. As such, our verse seems to have the order reversed, as it lists the eulogies before the crying.
In reference to this question, R. Moshe Feinstein, ZTL (Darash Moshe) and R. Elazar Menachem Man Shach, ZTL say the following: Sometimes when a person dies at a very old age, people hear the news, but it’s hard for them to cry. They think, “Hey, he already lived a very long life … this death isn’t so sad … I mean, his time had to come eventually!” This was actually the reaction of many to Sarah’s death. For this reason, it took the eulogies of Avraham to point out the enormous loss to the entire world that came about through her passing. After hearing of her countless fine qualities, the people were able to cry. And for this reason, our verse records the eulogies before the tears.