cron job to auto delete posts of a specific post type older than x days

// add the schedule event if it has been removed 
if( ! wp_next_scheduled( 'mg_remove_old_entries' ) ) {
  wp_schedule_event( time(), 'daily', 'mg_remove_old_entries' ); //run the event daily
}

// action hooked to fired with wordpress cron job
add_action( 'mg_remove_old_entries', 'mg_remove_old_entries' );
function mg_remove_old_entries() {
  $posts = get_posts( [
    'numberposts' => -1,
    'post_type' => 'vfb_entry',
    'date_query' => [
      // get all the posts from the database which are older than 60 days
      'before' => date( "Y-m-d H:i:s", strtotime( '-60 days' ) ),
    ],
  ]);

  if( !empty($posts) ) {
    foreach( $posts as $post ) {
      wp_delete_post( $post->ID ); //remove the post from the database
    }
  }
}

Note: There is no need to run any custom sql query. It would make the query slow and also it is not good for wordpress. WordPress has already in built functions for everything.