How to create order status and state programmatically in Magento 2?

You can create a custom order state and order status programmatically with the help of the class Magento\Sales\Model\Order\Status.

I have just created a new order status called processing_review and assigned the status to the processing state.

You need to create Datapatch to install the new status in Magento 2.
Just create Datapatch in your module setup folder,