A good yet compact overview of the evolution of software engineering metrics and various attempts to measure the productivity of software development teams: https://hybridhacker.email/p/diving-into-engineering-metrics.
It’s nice to see how metrics moved away from being output-driven (lines of code or velocity) towards being more outcome-focused (DORA). Finally, it’s now widely acknowledged that the well-being and satisfaction of development teams is also a critical factor affecting productivity that is taken into account in relatively new frameworks like SPACE or DevEx.