How can we library import without composer update give any solution.
No, cli command
php bin/magento setup: upgrade
is used only to upgrade schema/data of internal modules of magento based on increase in version of module or install module in case of new module.
The magento itself is upgraded through composer. It is neccessary to understand that composer updates modules based on
composer.json located at magento's root directory.
So you should mention dependency of required extension in your
composer.json and run following command ;
Or running composer require command with name of the module you require as mentioned in tutorial I have attached.
It would not update magento as the version of the magento modules mentioned in
composer.json is not changed.
You can follow this tutorial too - https://www.magestore.com/magento-2-tutorial/install-magento-2-extension-by-composer/