How do developers add “Smooth Transitions” to their sites?

What you are referring to is typically a combination of ajax and pushState. It’s a nifty effect and can add value to the end-user experience.

I deployed it on a WordPress site I built a few years ago (take a look here).

I used a JavaScript library called Smoothstate that has fairly good docs (at least to get the basics up and running).

You can see an answer I posted a few years ago about Smoothstate, that explains how to set up your JQuery so that it fires when a page transition completes.