Zend certified PHP/Magento developer

Magento2.3.4 on ubuntu 18.04 problem with proper install of php-imagick for php 7.3 Webp

My version of runing and working production Magento is 2.3.4

sudo apt show php -a

Package: php
Version: 1:7.2+60ubuntu1
Priority: optional
Section: php
Source: php-defaults (60ubuntu1)
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 12.3 kB
Depends: php7.2
Supported: 5y
Download-Size: 3,084 B
APT-Sources: https://repo.cyber-folks.pl/ubuntu bionic/main amd64 Packages
Description: server-side, HTML-embedded scripting language (default)
 PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
 open source general-purpose scripting language that is especially suited
 for web development and can be embedded into HTML.
 .
 This package is a dependency package, which depends on Ubuntu's default
 PHP version (currently 7.2).

I have installed php7.3 and nginx server.

php -v
PHP 7.3.22-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Sep  9 2020 06:46:30) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.22, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.22-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

I need to instal php-imagick to have ability to convert images to Webp format. I tried in this way:

sudo apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.4.tgz
tar xvzf imagick-3.4.4.tgz
cd imagick-3.4.4
sudo phpize
sudo ./configure
sudo make install
rm -rf /tmp/imagick-3.4.4*
echo extension=imagick.so >> /etc/php/7.3/cli/php.ini
echo extension=imagick.so >> /etc/php/7.3/fpm/php.ini
service php7.3-fpm restart
service nginx restart

Result of this is

user@wagwan2:/tmp/imagick-3.4.4$ sudo make install
/bin/bash /tmp/imagick-3.4.4/libtool --mode=install cp ./imagick.la /tmp/imagick-3.4.4/modules
libtool: install: cp ./.libs/imagick.so /tmp/imagick-3.4.4/modules/imagick.so
libtool: install: cp ./.libs/imagick.lai /tmp/imagick-3.4.4/modules/imagick.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /tmp/imagick-3.4.4/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /tmp/imagick-3.4.4/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Installing shared extensions:     /usr/lib/php/20170718/
Installing header files:          /usr/include/php/20170718/

The problem is that /usr/lib/php/20170718/ is realted to php7.2. How to configure it install it for version php7.3 ? Now I have error:

php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib/php/20180731/imagick.so (/usr/lib/php/20180731/imagick.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/imagick.so.so (/usr/lib/php/20180731/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.3.22-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Sep  9 2020 06:46:30) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.22, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.22-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies