I'd start by looking at what your SQL is trying to do and simplify it. From what I can see, your WHERE clause can be reduced to
vYear = 2022
AND EmpCode = 5229
AND NOT VacType IN (10, 15, 16, 17, 18, 19, 20, 21, 23, 24)
AND Result <> 1
AND ('12/07/2022' BETWEEN vStart AND vEnd
OR CONVERT(DATETIME, '2022-07-13 00:00:00', 102) BETWEEN vStart AND vEnd
)
I do not understand what the date ranges are for and why there are two different ways of representing dates unless your data has two sets of texts neither as real dates, in which case the comparisons are meaningless.