Ok this is the 1990 deal that people keep referring to. It's a major theme for Kremlin apologists so worth reading more about if you can.
After the Berlin Wall came down, Germany reunified in 1990 -- catching everyone off guard with how quickly this happened. This raised a major issue, should a reunified Germany be a NATO member?
At this point the Soviet Union still existed. After extensive negotiations, the Soviet Union agreed that reunified Germany could join NATO.
Here comes the controversy. The Russians later claimed and insist to this day that they only agreed to this because the US/NATO promised that they would not expand further into Eastern Europe. At that point those countries had gotten rid of their communist regimes and the Warsaw Pact was disintegrating, but nobody was really thinking about possible NATO expansion. Future events were uncertain and the Soviet Union still existed.
There was definitely no formal agreement or treaty on this question. That is very clear. The Russians are saying there was an informal deal on this.
The US/NATO disputes this -- and Gorbachev has confirmed their version of events. They say the only deal was that NATO troops would not be deployed to the former East Germany. This was put into the official agreement.
Even if an informal deal had been made, it was with the Soviet Union, which ceased to exist the following year, completely changing the entire European security order.
Basically it is a very controversial debate and I'm not going to say that there is one definitive interpretation of all this. But just be aware that if you refer to a 1990 'agreement' that NATO would not expand, this is not exactly true and you are parroting Putin's talking points.