you need to install this package:
pip install google-genai # Then from the same package do client = genai.Client(api_key='YOUR-GOOGLE-API-KEY')
pip install google-genai
# Then from the same package do
client = genai.Client(api_key='YOUR-GOOGLE-API-KEY')
This solved the problem for me.