select convert(varchar, '2023/07/23',4) when i execute this i got exactly which date i mentioned above
You are converting a string to a string. Yeah, that string looks like a date, but the data type is still varchar. The 4 there means nothing in this context.
select (convert(date, '2023/07/23',4) no..it does not changed , same date was coming : 2023/07/23
Here you are converting a string to a date, and you say the interpretation should be according to format code 4 (which I don't recall on the top of my head which it is.) And when I try it, I get the error Conversion failed when converting date and/or time from character string.
select Convert(varchar, getdate(),104) it can change like : 7/27/2023
Now you are converting a value of the type datetime to varchar, and you specify that you want the string be on the form m/dd/yyyy, which apparent is what 104 stands for.