It will only work when the field is in the form of an array. ‘created_at’ is given here because it’s a field in the database and it can be any other name. It can also be in ‘desc’ or ‘asc’ order.
if(count($orderids)) {
$this->invoices = $this->invoiceCollectionFactory->create()
->addFieldToSelect('*')->addFieldToFilter('order_id',['in' => $orderids]) ->setOrder('created_at', 'desc')->setPageSize($pageSize)->setCurPage($page);
}