We can use "hook_schema" to create a database table. This hook must be placed in the .install file of the module so that the table creation process run only when the module is installed.

<?php

// File:- my_module.install

/**
 * Implements hook_schema().
 */
function my_module_schema() {
  $schema['games'] = [
    'description' => 'List of games with description and download links.',
    'fields' => [
      'id' => [
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => "Record id.",
      ],
      'name' => [
        'description' => 'Name',
        'type' => 'varchar_ascii',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ],
      'description' => [
        'description' => 'Description of game.',
        'type' => 'varchar_ascii',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'url' => [
        'description' => 'Download url.',
        'type' => 'varchar_ascii',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ],
    ],
    'primary key' => ['id'],
    'indexes' => [
      'name' => [
        'name',
      ],
    ],
  ];

  return $schema;
}

When the module that created the database table is uninstalled, the table will automatically be deleted as well.

Output -

Database table

Check Drupal Schema API for other data types.

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Database%21database.api.php/group/schemaapi/9

https://www.drupal.org/docs/7/api/schema-api/data-types