The US did not actually declare war on Iraq in 2002/2003, for example:
The Authorization for Use of Military Force Against Iraq Resolution of 2002 was passed by Congress with Republicans voting 98% in favor in the Senate, and 97% in favor in the House. Democrats supported the joint resolution 58% and 39% in the Senate and House respectively. The resolution asserts the authorization by the Constitution of the United States and the Congress for the President to fight anti-United States terrorism. Citing the Iraq Liberation Act of 1998, the resolution reiterated that it should be the policy of the United States to remove the Saddam Hussein regime and promote a democratic replacement.
The resolution "supported" and "encouraged" diplomatic efforts by President George W. Bush to "strictly enforce through the U.N. Security Council all relevant Security Council resolutions regarding Iraq" and "obtain prompt and decisive action by the Security Council to ensure that Iraq abandons its strategy of delay, evasion, and noncompliance and promptly and strictly complies with all relevant Security Council resolutions regarding Iraq." The resolution authorized President Bush to use the Armed Forces of the United States "as he determines to be necessary and appropriate" to "defend the national security of the United States against the continuing threat posed by Iraq; and enforce all relevant United Nations Security Council Resolutions regarding Iraq."
Wikipedia has a full page on Declaration of war by the United States
. They break them down in formal and informal ones. The last formal one was indeed during WWII. The 2003 Iraq war belongs to the latter "undeclared wars" category, according to Wikipedia.
A 2014 CRS document puts the latter category in somewhat different [official] terms, but still notes the distinction:
From the Washington Administration to the present, Congress and the President have enacted 11
separate formal declarations of war against foreign nations in five different wars. Each
declaration has been preceded by a presidential request either in writing or in person before a
joint session of Congress. The reasons cited in justification for the requests have included armed
attacks on United States territory or its citizens and threats to United States rights or interests as a
Congress and the President have also enacted authorizations for the use of force rather than
formal declarations of war. Such measures have generally authorized the use of force against
either a named country or unnamed hostile nations in a given region. In most cases, the President
has requested the authority, but Congress has sometimes given the President less than what he
asked for. Not all authorizations for the use of force have resulted in actual combat. Both
declarations and authorizations require the signature of the President in order to become law.
In contrast to an authorization, a declaration of war in itself creates a state of war under
international law and legitimates the killing of enemy combatants, the seizure of enemy property,
and the apprehension of enemy aliens. While a formal declaration was once deemed a necessary
legal prerequisite to war and was thought to terminate diplomatic and commercial relations and
most treaties between the combatants, declarations have fallen into disuse since World War II.
The laws of war, such as the Hague and Geneva Conventions, apply to circumstances of armed
conflict whether or not a formal declaration or authorization was issued.
It goes on to further discuss the distinction within US law between the two categories, which mainly has to do with the activation (or not) of certain "standby statutory authorities", which are actually quite numerous in case of (declared) war.
So the answer is basically that the distinction (authorization vs declared war) has mostly to do with US internal law provisions rather than being a sharp distinction in international law.
There's actually a 3rd category (both in Wikipedia) and in other sources, in which not even an AUMF (authorization to use military force) is sought from Congress because it is deemed authorized by some international body. Most famously Truman's "police action" that was the Korean War, however that is deemed a somewhat singular event given its magnitude...
Since President Truman’s “police action” in the Korean War, scholars in law and political science have considered the possibility that presidents would attempt to substitute congressional authorization with authorization from an international organization when using military force. While presidents have on multiple occasions appeared to do so, after considering the scale of the operations undertaken there is clear evidence that presidents since Truman have avoided major war absent formal congressional approval. Instead, uses of force undertaken with mere international approval have consistently been orders of magnitude smaller in scale than those conducted pursuant to formal authority from the legislature.
George H.W. Bush specifically encountered the opportunity to use force unilaterally in the Gulf War with U.N. approval but decided against it because of the anticipated high costs despite simultaneously claiming that congressional approval was not legally necessary, continuing the consistent practice of presidents since Truman. The White House counsel wrote that the action could be legally justified absent congressional approval, but that formal authorization would be beneficial both to gain public support and to share responsibility for a possible poor outcome.