[OnePlus Nord N10 5G Guides, News, & Discussion] TheArkive:
I managed to find this post by kronflux. My device is BE89BA so some modification was necessary.

This script also does partition deletes/recreation.

Here's the original script / batch file:

@echo off
TITLE OnePlus Nord N10 5G Restore - BE86AA Oxygen OS 10.5.12
cls
echo Welcome to the OnePlus Nord N10 5G BE86AA Oxygen OS 10.5.12 Restore Script!
echo WARNING: THIS SCRIPT WILL WIPE YOUR DEVICE COMPLETELY AND RESTORE OXYGEN OS 10.5.12
echo THIS WILL AFFECT BOTH SLOTS [A] AND [B]
echo.
echo Press any key to run the script, or close the window to exit now.
echo (script takes roughly 5 minutes to restore your device)
pause >nul 2>&1
cls
adb reboot-bootloader
TIMEOUT /T 10
fastboot flashing unlock
fastboot flashing unlock_critical
fastboot oem unlock
fastboot -w
fastboot flash dtbo dtbo.img
fastboot --set-active=a
fastboot flash modem_a modem.img
fastboot flash boot_a boot.img
fastboot flash recovery recovery.img
fastboot reboot-bootloader
TIMEOUT /T 10
fastboot --set-active=b
fastboot flash modem_b modem.img
fastboot flash boot_b boot.img
fastboot flash recovery recovery.img
fastboot reboot-bootloader
TIMEOUT /T 10
fastboot reboot fastboot
TIMEOUT /T 10
fastboot flash --slot=all abl abl.img
fastboot flash --slot=all aop aop.img
fastboot flash --slot=all bluetooth bluetooth.img
fastboot flash --slot=all boot boot.img
fastboot flash --slot=all cmnlib cmnlib.img
fastboot flash --slot=all cmnlib64 cmnlib64.img
fastboot flash --slot=all devcfg devcfg.img
fastboot flash --slot=all dsp dsp.img
fastboot flash --slot=all dtbo dtbo.img
fastboot flash --slot=all featenabler featenabler.img
fastboot flash --slot=all hyp hyp.img
fastboot flash --slot=all imagefv imagefv.img
fastboot flash --slot=all keymaster keymaster.img
fastboot flash --slot=all logo logo.img
fastboot flash --slot=all mdm_oem_stanvbk mdm_oem_stanvbk.img
fastboot flash --slot=all modem modem.img
fastboot flash --slot=all multiimgoem multiimgoem.img
fastboot flash --slot=all oem_stanvbk oem_stanvbk.img
fastboot flash --slot=all opproduct opproduct.img
fastboot flash --slot=all qupfw qupfw.img
fastboot flash --slot=all recovery recovery.img
fastboot flash --slot=all spunvm spunvm.img
fastboot flash --slot=all storsec storsec.img
fastboot flash --slot=all tz tz.img
fastboot flash --slot=all uefisecapp uefisecapp.img
fastboot flash --slot=all xbl xbl.img
fastboot flash --slot=all xbl_config xbl_config.img
TIMEOUT /T 2
fastboot delete-logical-partition odm
fastboot delete-logical-partition odm_a
fastboot delete-logical-partition odm_b
fastboot delete-logical-partition product
fastboot delete-logical-partition product_a
fastboot delete-logical-partition product_b
fastboot delete-logical-partition system
fastboot delete-logical-partition system_a
fastboot delete-logical-partition system_b
fastboot delete-logical-partition system_ext
fastboot delete-logical-partition system_ext_a
fastboot delete-logical-partition system_ext_b
fastboot delete-logical-partition vendor
fastboot delete-logical-partition vendor_a
fastboot delete-logical-partition vendor_b
TIMEOUT /T 2
fastboot create-logical-partition odm_a 100000
fastboot create-logical-partition odm_b 100000
fastboot create-logical-partition product_a 100000
fastboot create-logical-partition product_b 100000
fastboot create-logical-partition system_a 100000
fastboot create-logical-partition system_b 100000
fastboot create-logical-partition vendor_a 100000
fastboot create-logical-partition vendor_b 100000
TIMEOUT /T 2
fastboot flash --slot=all odm odm.img
fastboot flash --slot=all product product.img
fastboot flash --slot=all system system.img
fastboot flash --slot=all vbmeta vbmeta.img
fastboot flash --slot=all vbmeta_system vbmeta_system.img
fastboot flash --slot=all vendor vendor.img
fastboot reboot

exit

I tried this, modified of course to omit the images that don't exist in my devices payload.bin but it didn't work.

I guess next I'll try a simple flash for each image. Any suggestion to format each partition first or not?

EDIT: The system_ext.img file is flashed to system partition? Or is there a system_ext partition? I noticed that my device images include a few partitions that are not listed with fastboot getvar all, like odm, product, system, etc. So this seems slightly trickier than just a "simple flash" for each image.