I want to export the cards in the order they appear.

When I normally export Anki cards, they are in the order in which they were created.

But I would like to export on a different basis.

In the order in which the cards will appear, not in the order in which they were created.

What should I do?

Anki will preserve the order of any new cards when you export without scheduling, so if you are creating cards both to share with others, and to study for yourself, a way to achieve this is to review the cards in a separate profile, keeping all the cards “new” in the profile you use to add/order the cards.