How to make OR condition in WP_Query

WP_Query does not handle this sort of query: use two instances of WP_Query, and then combine the results.

Untested code:

$posts = new WP_Query( array(
    'post_type' => 'post',
) );

$post_ids = array_column( $posts->posts, 'ID' );

$author = new WP_Query( array(
    'post_type' => 'any',
    'author' => 123,
    'post__not_in' => $post_ids, // prevent duplicates
) );

$combined = array_merge( $posts->posts, $author->posts );

There are filters inside of WP_Query that you can use to modify the SQL statement (ex: posts_where), but need to be careful as it can impact other queries.

tech