This is not true in modern economies. Governments do very much serve as actors in the economy. The most important way that the government does this in the United States is through providing many Americans with income. A very large number of Americans work for the government. They are police officers and teachers and other government workers. Other Americans get government payments through such things as Social Security.
Another way that the government participates in the economy is through buying goods and services from firms in the private sector. Governments pay construction firms to build buildings and roads. They pay firms to install their computer systems. They pay for many other goods and services, thereby directly participating in the economy.
While the government does make many laws to regulate the interactions between consumers and businesses, it also participates directly in the economy.