An isothermal process indicates that $\Delta Q = 0 $ as there's no change in heat energy. But in most text books it's taken as $\Delta Q = 0 $ and internal energy change is taken as a constant. At the same time a 0 change in heat energy implies a change in work done on/by the system and, by definition work done by/on the system contributes to internal energy $U$ right?
An isothermal process is not necessarily one in which Q = 0. In an isothermal process, the only thing we can say is $\Delta T=0$.
In addition, the internal energy is, in general, not just a function of temperature. It is a function of temperature only for an ideal gas (or for an incompressible solid or liquid). So, for the isothermal expansion or compression of an ideal gas, the temperature and internal energy are constant. For a non-ideal gas, the internal energy is not constant.
The internal energy U is a function of many variables, (temperarure or entropy) , (pressure or volume) and (number of moles or chemical potential) the temperature part corresponds to dQ while the pressure/volume dependence corresponds to dW if dQ=-dW then dU=dQ+dW=-dW+dW=0. Ie the change in internal energy is 0