What did it cost? Everything.
After completing his ‘task,’ Thanos retires to a garden planet (also known as Planet 0259-S) to spend the rest of his life farming.
The credits list number of locations where plate (ie. background) photography was performed, including the Philippines. This ABS-CBN article confirms that the Banaue Rice Terraces in the Philippines were used for the scene of Thanos at the end of the film.
(Avengers: Infinity War, 2018)