The quality is identical, the file is far smaller
BMP is typically stored with no compression at all, and PNG compresses losslessly, so you keep every pixel and usually save most of the size.
An uncompressed BMP spends a fixed number of bytes on every pixel regardless of what the picture contains, which is why a simple screenshot can run to several megabytes. PNG stores exactly the same pixel values but packs them efficiently, and it does especially well on the flat colour and repeated rows that BMP files often contain. Reductions to a fraction of the original size are common on screenshots and diagrams, with no visible change whatsoever.