How to stop PHP code running when in a child theme

You can’t actually “remove” PHP code from the parent theme. What you can do is undo things done there.

The counterpart of wp_enqueue_script is wp_dequeue_script.

If you put this in your functions.php it should remove the Masonry Plugin (untested)

add_action( 'wp_print_scripts', 'de_script', 100 );

function de_script() {
    wp_dequeue_script( 'jquery-masonry' );
}

Source: Function Reference/wp dequeue script @ Codex

As I haven’t tested this be aware of the fact that this could have unwanted side effects if the theme relies on the Masonry Plugin.