To the best of my knowledge you're following Mosh's React 18 for Beginners tutorial and he is using v2 of Chakra UI which is different from Chakra UI v3.
I'd recommend that you install Chakra UI v2 to ensure code compatibility :)