Problem with installing or uninstalling .deb packages

whenever I want to install or uninstall any .deb packages I got this error:

dpkg was interrupted, you must manually run ‘sudo dpkg --configure -a’

when I run this command (sudo dpkg --configure -a) the /etc/default/grub sourcing goes into an unbreakable loop

from terminal:

Processing triggers for linux-image-5.15.0-53-generic (5.15.0-53.59) …

/etc/kernel/postinst.d/dkms:

dkms: running auto installation service for kernel 5.15.0-53-generic

…done.

/etc/kernel/postinst.d/initramfs-tools:

update-initramfs: Generating /boot/initrd.img-5.15.0-53-generic

/etc/kernel/postinst.d/zz-update-grub:

Sourcing file `/etc/default/grub’

Sourcing file `/etc/default/grub’

Sourcing file `/etc/default/grub’

Sourcing file `/etc/default/grub’

Sourcing file `/etc/default/grub’

Sourcing file `/etc/default/grub’

output when I run: diff -s /etc/default/grub /usr/share/grub/default/grub`:

6c6
< GRUB_DEFAULT=1

GRUB_DEFAULT=0
21,23d20
< $sudo update-grub
<
<
37,39d33
<
<
<