In this post on StackExchange How do I add a new settings page for my extension? the way to create settings in CiviCRM is stated as : Create a settings dir in your extension's base directory, and within that create a whateveryouwant.setting.php.
I always use Civi::settings()->set and Civi::settings()->get. What is the recommended way?