Correct way to use register_activation_hook

This quotation from The Codex clearly states what does this function do:

The register_activation_hook function registers a plugin function to
be run when the plugin is activated.

This means, this function works similar as a class’s __construct() method. You can use it to set initial options, update database, and more. It doesn’t run every time the core is loaded, it only runs when you click the Activate button of a plugin in the plugins list.