The best way to deal with this problem is to use the format YYYYMMDD without delimiters, for instance 20251021. This format is always interpreted in the same way with all date-related data types in SQL Server.
The format YYYY-MM-DD is also always understood correctly with the newer types datetime2 and datetimeoffset, but not the older data types datetime and smalldatetime, but here the interpretation depends on the DATEFORMAT setting, which in its turn takes its default from the language setting. Which in its turn defaults to us_english when you install an English version of SQL Server. With us_english follows the format mdy, and some smart person in California(*) realised that if the string is NNNN-NN-NN, then this can't be month-day-year, but apparently the year must come first. But apparently, the very idea that no one would ever write a date with year first was so alien, that they did not bother to do a reality check to see if any of the formats were used in practice. (In which case they would have found that YYYY-MM-DD is ISO standard, and YYYY-DD-MM is extremely little used, if at all.)
You can change your personal default language with this command:
ALTER LOGIN youruser WITH DEFAULT_LANGUAGE = British
From now on, your session will default to the DATEFORMAT setting dmy.
It is also possible to set a server-wide default for all new logins that are created on the server.
However, none of these options is nothing I recommend. The best is to stick to the unambiguous formats and leave the defaults as they are.
(*) California is where Sybase, who originally designed SQL Server, are located.