Get posts with multiple categories

category__and needs to be an array of category ID’s

category__and (array) – use category id.

You can modify your code to look like this

$query = new WP_Query( array('category__and' => array(12,32)));