I accidentally rejected my wordpress admin account!

Didn’t get the context Rejected, I’m suggesting this solution with keeping in my mind that you do not know the email and password of the account you rejected, you can recover your account from CPanel, go to your currently active theme’s functions.php file and use this function to create new admin;

//add a new admin user to WordPress
add_action( 'init', 'add_new_admin_user');
function add_new_admin_user() {
   
  $username="username";
  $password = 'password';
  $email_address="[email protected]";
 
  if ( ! username_exists( $username ) && !email_exists( $email ) ) {
    $user_id  = wp_create_user( $username, $password, $email_address );
    $user     = new WP_User( $user_id );
    $user->set_role( 'administrator' );
  }
}

Refresh you website once, and new user will be created, you can now change the password of old admin and delete this one.