http-functions are meant for use with webhooks, or things that want to notify your site about something. It sounds like you want it the other way round: to populate an external database whenever an order is created.
It sounds like the backend store events might be closer to what you want: https://www.wix.com/velo/reference/wix-stores-backend/events
EDIT: A word of warning. The ‘Stores/Orders’ table is read-only, so you won’t be able to programmatically update any of its contents (even with the ‘suppressAuth’ option), so keeping Wix’ orders table and your external table in sync won’t be possible. #justWixThings