The national emergency declared in 1979, against Iran, was done under the IEEPA which grants the President the power to block transactions and freeze assets against foreign threats. It doesn't grant the power to make laws.
Here's some good reading:
https://www.politico.com/news/2021/07/27/democrats-biden-som...
They successfully argued the President can just attack other countries whenever he wants, so long as it's part of fighting "terrorism".