How to create a custom attribute and access it on any page?

How to create a custom attribute from System & Setting ->Names & Attributes and access it on pages

Attributes created in that location are Site Attributes, not Page Attributes.

If you want to create page attributes you need to create them in Dashboard → Pages & Themes → Attributes

If you want to use attributes from here which are global attributes you can add them here and then acces them in your code like this.

$site = \Site::getSite();
$varible = $site->getAttribute('attribute_handle');