Network Rail receives around £7bn in direct subsidy each year. The government also pays for operators' costs, which include fixed and variable track access charges and rent for stations and depots paid to Network Rail. These amount to around £2bn a year. It also has a huge amount of debt - £57bn.£1.6bn pre tax profit last year according to Network Rail's own accounts.
Network Rail 2021 statement
It does not make a profit in any meaningful sense of the word.