Gross margin: revenue minus the cost of delivering it
Gross margin is what is left after you subtract the direct cost of making or delivering the thing you sold. For a service business, that is the labour and tools that go into the project. For a product business, it is materials, manufacturing, packaging, and shipping.
Gross margin tells you whether each unit of sale is profitable before you pay rent, salaries of non-delivery staff, marketing, or any other overhead. If gross margin is weak or negative, no amount of overhead cutting will save the business.
Net profit: gross margin minus everything else
Net profit is what is left after you subtract overheads (rent, admin staff, software, marketing, professional fees) and taxes from gross margin. It is the actual profit the business made for the period.
A business can have strong gross margin and weak net profit if overheads are too high. The fix is to look at the overhead line by line and ask which costs scale with revenue and which do not.
Which to optimize first
Always look at gross margin first. If gross margin is below 30 percent for a service business or below 40 percent for a product business, your pricing or your unit economics need attention before you touch overheads. If gross margin is healthy and net profit is weak, look at overheads.