Using wp_logout_url()
is your best choice.
You will need to create a <a>
tag and in the href attribute output wp_logout_url()
<a href="<?= wp_logout_url('/'); ?>" title="Logout">Logout</a>
I passed /
as an argument because after the user will click the link he will be redirected back to the homepage, you can change it to what ever you want