WordPress get category list order by custom category id order

WordPress – Category list order,
Rearrange category display order in WordPress,
Wordpress order categories,
Wordpress change the order of a list of categories.

WordPress get category order by custom id list

$optArr = array('include' => [16,17,19,18,22,147], 'orderby' => 'include');
$cats = get_categories($optArr);
print_r($cats);