England and Scotland did not directly become the "United Kingdom." The process occurred in two stages:
The Acts of Union 1707 merged the Kingdom of England (including Wales) and the Kingdom of Scotland into a single state: the Kingdom of Great Britain. One parliament (Westminster), one monarch, but separate legal (Scots law) and religious (Church of Scotland) systems.
The Acts of Union 1800 (effective 1 Jan 1801) united Great Britain with the Kingdom of Ireland, creating the United Kingdom of Great Britain and Ireland.
After Irish independence (1922), the state was renamed the United Kingdom of Great Britain and Northern Ireland (1927).
So: England + Scotland → Great Britain (1707) → + Ireland → UK (1801) → – most of Ireland → current UK (1922).