LM338 is getting hot and stop working when we try to flow current more then 1A
Here's your problem:
&quot;We are not using any heatsink.&quot;
You are drawing a lot of current from your regulator.  Linear regulators drop voltage by acting like a resistor in series with the source.  The waste power as heat.
$$P = (V_{in}- V_{out}) \times I$$
You don't say what your input voltage is, but the LM338 allows a maximum of 40 V difference between input and output.  At 1 ampere that's 40 watts.  At 5 amperes that's 200 watts.
That amount of power is wasted as heat.  You must use a heat sink when drawing high current from a linear regulator.