It probably depends on the course
A major cost of offering an undergraduate Biology course (and presumably other science and engineering courses I have less experience of) is practicals. These consume expensive materials, and require substantial additional support in the form of PhD students who are paid to assist in the laboratory, as well as taking multiple technicians and academic staff to deliver the classes.
There is no online equivalent to these practical elements, and so their absence likely represents a substantial saving to the university, and their loss is a significant deficit in the education such students are receiving.
For other courses, such as Mathematics, teaching is likely no cheaper and probably actually requires additional time from the teaching staff compared to in-person teaching. Since these staff are salaried they probably aren't being paid by the hour anyway, I leave debating whether this is really a "cost" to other people who are fond of arguing.
But any analysis of the cost of teaching is missing the point
The amount universities charge for a degree is down either to government regulation (as in the UK) or the market value of a degree to the student but either way the university is not totting up a value for the education delivered and charging the student an itemised bill for that; it is deciding what income it need, or can get, and is charging accordingly.
(Note: since these seems directed at the current situation rather than Online in general, I am considering only the costs of a traditional university providing temporary online teaching not the comparison to full distance learning as a long term decision.)