It seems that I was working with a deprecated yfinance version.
I've solved it by upgrading the package through the command "pip install --upgrade yfinance" as Tim raised under the comments.