This is a tiny glimpse into the 1776 magnum opus The Wealth of Nations.
Adam Smith was an moral philosopher and an economic theorist. To understand his intent, a quick economics history lessons.

Between the 16th to the 18th century, the de jour economic theory was that of mercantilism. A nation, the mercantilist supporter would argue, is only as good as its economical self-sufficiency and its ability to export access goods. To achieve such a thing, a nation must have a large population, build new houses and industries, accumulate enough gold, silver and other precious metal and promote local agriculture.

Such a feat requires tight industrial regulations through tariffs (and having natural resources and people).

The problem: mercantilism evidently led to restrictive trade, inflation and war. (…and the slave trade)

Adam Smith looked at the state of his home country and drew simple conclusions.
Mercantilism seemed not a measure of prosperity, but a hinderance to the same to him.

His moral observations led him to believe that if people were not forced to produce and not forbidden to trade, their own self-interest would propel them to take up an industry they were best at and compete with their fellow people. This competition would lead to a richer, better nation.

The rulers should only care about protection - both from violence of other nations and from injustices committed by members of their own society, and about public maintenance, such as infrastructure and similar public institutions.

This was a revolutionary thought and often satirized in Smith’s own day. Today, economists see Smith as the father of the free market theory and he is often heralded as THE guy for defenders of capitalism.

I would like to point out however, that Smith actually ended up working, in his later years, in the office which controlled the very tariffs he so disliked. He was also an advocate for public education, making him a sympathizer of capitalism but not a laissez-faire economist.