The standard sequence in both Hajj and Umrah is Tawaf first, then Sa'i. For Umrah, all four schools agree that Sa'i must follow Tawaf — this sequence is an integral part of the ritual. Performing Sa'i before Tawaf in Umrah would mean you need to redo the Sa'i after completing Tawaf.
For Hajj, there is more scholarly discussion. The Hanbali school allows some flexibility: if a pilgrim has already performed Tawaf al-Qudum (the arrival Tawaf), they may perform Sa'i after it. They may also, according to some Hanbali scholars, perform the Sa'i of Hajj on the Day of Arafat before performing Tawaf al-Ifadah. This is based on the hadith where the Prophet (peace be upon him) was asked on the Day of Sacrifice about performing rituals out of order and said: 'Do it, and there is no harm.'
The Hanafi, Maliki, and Shafi'i schools maintain that Sa'i must always follow a preceding Tawaf, whether it is Tawaf al-Qudum or Tawaf al-Ifadah. If someone performs Sa'i without a preceding Tawaf, it is not counted and must be repeated. For practical purposes, following the standard sequence (Tawaf then Sa'i) is the safest approach accepted by all schools. If you find yourself in an unusual situation, consult a knowledgeable scholar present at the Haram.