Putting a resized image into media library with wp_get_image_editor(

You need the generate_filename method of the image editor class. Like this:

$filename = $img->generate_filename( 'resized', ABSPATH.'wp-content/uploads/resized-images/');
$image->save($filename);

This will save the image, renamed originalname-resized, in the resized-images directory of the upload folder. This does not mean WordPress knows it is there. That depends on the context in which you are calling wp_get_image_editor().