Install php-imagick on NextcloudPi with PHP8.1

Nextcloud version (eg, 20.0.5): 28.0.3.2
Operating system and version (eg, Ubuntu 20.04): debian 11
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): 8.1

The issue you are facing:

I need HEIC Image Support in my NextcloudPi Instance.
Nextcloud Documentation tells me i need to install php-imagick for that.
Apt get install command tell me the wrong php version (8.3) for imagick.
What can i do to get the correct version and dependencies?

~ $ sudo apt-get install php-imagick
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  fonts-droid-fallback fonts-noto-mono fonts-urw-base35 ghostscript gsfonts imagemagick-6-common libfftw3-double3 libgs9
  libgs9-common libidn11 libijs-0.35 libjbig2dec0 liblqr-1-0 libltdl7 libmagickcore-6.q16-6 libmagickwand-6.q16-6
  libopenjp2-7 libpaper-utils libpaper1 php8.3-cli **php8.3**-common php8.3-imagick **php8.3**-opcache php8.3-phpdbg php8.3-readline
  poppler-data
Suggested packages:
  fonts-noto fonts-freefont-otf | fonts-freefont-ttf fonts-texgyre ghostscript-x libfftw3-bin libfftw3-dev
  libmagickcore-6.q16-6-extra php-pear poppler-utils fonts-japanese-mincho | fonts-ipafont-mincho fonts-japanese-gothic
  | fonts-ipafont-gothic fonts-arphic-ukai fonts-arphic-uming fonts-nanum
The following NEW packages will be installed:
  fonts-droid-fallback fonts-noto-mono fonts-urw-base35 ghostscript gsfonts imagemagick-6-common libfftw3-double3 libgs9
  libgs9-common libidn11 libijs-0.35 libjbig2dec0 liblqr-1-0 libltdl7 libmagickcore-6.q16-6 libmagickwand-6.q16-6
  libopenjp2-7 libpaper-utils libpaper1 php-imagick php8.3-cli php8.3-common php8.3-imagick **php8.3**-opcache php8.3-phpdbg
  php8.3-readline poppler-data
0 upgraded, 27 newly installed, 0 to remove and 61 not upgraded.
Need to get 4,371 kB/24.1 MB of archives.
After this operation, 91.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. install NCP 1.53.2
  2. install imagick (sudo apt-get install php-imagick)