Twitter cards come in 4 different types:
Steps to add Twitter card using Yoast SEO Plugin
Step 1: Install and activate Yoast SEO plugin
Go to Plugins-> Add New and type “Yoast” in search bar. You will see Yoast SEO in the filtered list. Click Install button. After installing click activate button to activate the plugin.
Step 2: Configure Twitter card
1) Add twitter username and click save changes.
You are now ready to use Twitter card for your website.
To validate if the twitter card is working or not, we need to use Twitter Card Validator tool https://cards-dev.twitter.com/validator. Add your page url and click Preview card. If your card preview shows Title, description and image then that means, you have rightly configured your Twitter card.
Sometimes Twitter Card Validator is not able to fetch the data. There can be multiple reasons, but one of the main reasons is the slow internet due to which details are not fetched by this tool. For such issue, just try to reload the page 2-3 time and then again try to preview card.