Yahoo has changed their free access to the historical data download you could do from the online screen and are now charging for it. There is some good news, in that you can still download historical data, but the output is not in CSV. It comes over as JSON format, so you have to read and reformat that. Here is your link with the new format to continue to get historical data. You simply change "download" to "chart".
https://query1.finance.yahoo.com/v7/finance/chart/TSLA?period1=1695497364&period2=1727119764&interval=1d&events=history&includeAdjustedClose=true