Why Thermodynamic cycles are used to obtain work for example carnot engine rather than single isothermal process which is part of cycle and can be used to obtain more work.And why isothermal process do not violate second law even when there is no friction or any irreversibility.I know they violate second law in actual world due to friction .But in theory reversible processes are possible which do not violate second law,so why it doesn't.
An engine operating in a cycle can operate continuously i.e. for any number of cycles. If you just pull out one step in the cycle you don't have a useful engine because it can only operate once and then only for a short time.
An isothermal process is reversible by definition because temperature is not defined in an irreversible process. So an isothermal process does not increase (total) entropy. Incidentally this does not violate the second law since the second law says only that entropy cannot decrease. It does not forbid energy staying the same.