In this tutorial, I have installed a free SSL certificate from Let's Encrypt using the Certbot tool on Google Cloud Platform VM running Debian OS that hosts a WordPress site using Apache server. You can follow similar steps for other Cloud providers / OS distributions / CMS vendors / Web servers.
Part-1: Configure Virtual Host for your domain on Apache
cd /var/www/html
wp option update home 'https://example.com'
wp option update siteurl 'https://example.com'
sudo nano /etc/apache2/sites-available/example.com.conf
sudo apache2ctl configtest
sudo a2ensite example.com
sudo systemctl reload apache2