Run function during new blog templates blog creation

add_filter( 'wp_insert_post_data' , 'update_author', '99', 2 );
function update_author($data , $postarr) {
  if ('product' == $postarr['post_type'] && 'private' == $postarr['post_status']) {
    $data['post_author'] = '1';
  return $data;

I need this function to run when a new site is created, or just in a way that every private post in the database is constantly switched to this post_author.

It works currently when a new post is being updated.