Updating the Hilt version solved the issue for me.
I updated from 2.49 to 2.56.1.
2.49
2.56.1
You can find the latest stable version of Hilt here: Hilt setup documentation