Install Composer and run the following command to get the latest version:
composer require "twig/twig:^3.0"
Introduction
Twig for Template Designers