How to Add Custom Logo to WordPress Theme

How to Add Custom Logo to WordPress Theme. How to align WordPress logo in the center, on the right, and on the left.

Get the code from WordPress Developer Functionality page.
https://developer.wordpress.org/themes/functionality/custom-logo/