Anything by Lenovo usually works well with Linux. Make sure it's doesn't have Nvidia card but rather AMD graphics or intel graphics.
They are also typically the cheapest laptops. Try get Intel core i5 or Ryzen 5 CPU. That should be enough power to do anything you need.
As far as OS is concerned, I HIGHLY recommend Ubuntu desktop. It is by far the best Linux distro and especially good for programming as huge amounts of programmers use it as the desktop of choice.
Ubuntu also makes the most Software when it comes to cloud, servers, apps, IOT etc and they all work well together. Which is why Devs/programmers love Ubuntu so much.