You have X=Y=c because a and b are 10^36 smaller than c and the machine precision is 10^-15.
Here you are working in machine precision (a machine precision number has nothing after the `)
It is possible to work with a higher precision, for example 40 digits:
a= 4.248354255291589`40*^-18
b = -4.248354255291589`40*^-18
c = 1.3956025592769147`40*^18
X = a + c
Y = b + c
Z = X - Y
Z Log[Z]t
4.248354255291589000000000000000000000000*10^-18
-4.248354255291589000000000000000000000000*10^-18
1.395602559276914700000000000000000000000*10^18
1.395602559276914700000000000000000004248*10^18
1.395602559276914699999999999999999995752*10^18
8.497*10^-18
-3.340*10^-16
EDIT
It is possible to mix different precisions, for example 4 digits for a and b and 40 for c :
a = 4.248354255291589`4*^-18
b = -4.248354255291589`4*^-18
c = 1.3956025592769147`40*^18
X = a + c
Y = b + c
Z = X - Y
Z Log[Z]
4.248*10^-18
-4.248*10^-18
1.395602559276914700000000000000000000000*10^18
1.395602559276914700000000000000000004248*10^18
1.395602559276914699999999999999999995752*10^18
8.50*10^-18
-3.340*10^-16
But, as soon as there is a machine precision number somewhere , the whole calculus is done in machine precision. So this doesn't work :
a = 4.248354255291589`*^-18
b = -4.248354255291589`4*^-18
c = 1.3956025592769147`40*^18
X = a + c
Y = b + c
Z = X - Y
Z Log[Z]
4.24835*10^-18
-4.248354255291589000000000000000000000000*10^-18
1.395602559276914700000000000000000000000*10^18
1.3956*10^18
1.395602559276914699999999999999999995752*10^18
0.
Indeterminate