The Beretta M9 and the Beretta 92FS are very similar firearms, but there are some differences between them.
The Beretta M9 is a military version of the Beretta 92FS, which was adopted by the United States Armed Forces in 1985 as the standard sidearm. The M9 has a sand-resistant magazine and a slightly different finish to the slide and barrel. It also features a different engraving on the slide, with the words "U.S. Military M9" and a unique serial number.
The Beretta 92FS is a commercial variant of the M9 that is available to civilians. It has a different finish and a different grip design compared to the M9, and it lacks the unique engraving found on the M9.
Other than these differences, the two firearms are very similar in terms of design, operation, and performance. Both are semi-automatic pistols chambered in 9mm, and they share the same basic design, including a double/single-action trigger, a safety/decocker lever, and a 15-round magazine capacity.