Hi @teja_f3
You flow mappings looks ok to me except couple of things
1. You can directly declare the value under the create file action and it will overwrite the existing file. You don't have to use initialise variable but nothing wrong in that too.
2. Its about your IF condition. Remember the comparisons are case sensitive. So if you looking to get only .CSV files then better to convert to one case either small or capital using the expression ToUpper() or ToLower(). Also in my condition I used the operator as ends with. Here is my condition.

If you flow is not working then I believe your attachment is something like test.csv and you are checking CSV (capital) which won't evaluate it correctly. I am not sure about you have three conditions and one is left to blank as well.
Above the expression I used is
toLower(outputs('Get_Attachment_(V2)')?['body/name'])
Thanks