AMP or Accelerated Mobile Pages are lightweight pages intended to provide mobile users a lightning-fast and more engaging experience.
In simple words, it is an open-source HTML framework that offers a simple way to create webpages that are fast, smooth-loading, and give precedence to the user experience. In order to make it more attractive to users, it is basically putting the website on diet.
Well coming to your question, AMP is not a direct ranking factor by itself that means having AMP pages won’t certainly increase rankings instantly. But as we are aware that Google now gives higher prominence on site speed and mobile-friendliness with their shift to mobile-first indexing and the introduction of Core Web Vitals which makes AMP an indirect ranking factor.