Anki is a great software, but unfortunately it is quite difficult to install on Linux systems. Almost all packages on major distros are by now years out of date or kicked out, because Anki changed its build systems so many times, that the existing package maintainers simply dropped it: https://github.com/ankitects/anki/issues/1378
Nowadays, the Anki version in Ubuntu is from 2019! The snaps are also hopelessly outdated.