How to get data from model using junction table

Hello. I need to get data from model using junction table.
I have Video, Category and VideoCategory (junction model of Video and Category) models.
My Video model is like this

<?php

namespace common\models;

use common\models\query\VideoQuery;
use Yii;
use yii\behaviors\BlameableBehavior;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
use yii\helpers\FileHelper;

/**
 * This is the model class for table "video".
 *
 * @property string $video_id
 * @property string $title
 * @property string|null $about
 * @property int|null $created_by
 * @property int|null $created_at
 * @property int|null $updated_at
 */
class Video extends ActiveRecord {
    public $categories;
// ---some code--- 
//--then i save the video categories using aftersave() method.
public function afterSave($insert, $changedAttributes) {
        parent::afterSave($insert, $changedAttributes);
        $this->deleteExistingCategories();
        if (isset($_POST['Video']['categories'])) {
            $this->saveVideoCategories($_POST['Video']['categories']);
        }
    }

    public function deleteExistingCategories() {
        VideoCategory::deleteAll(['video_id' => $this->video_id]);
    }

    public function saveVideoCategories($categoriesList) {
        foreach ($categoriesList as $category) {
            $videoCategory = new VideoCategory();
            $videoCategory->video_id = $this->video_id;
            $videoCategory->category_id = $category;
            $videoCategory->save();
        }
    }
}

My category model is

<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "category".
 *
 * @property int $id
 * @property string $category_name
 * @property int|null $created_by
 * @property int|null $created_at
 * @property int|null $updated_at
 */
class Category extends \yii\db\ActiveRecord {
//just gii generated simple code.
}

My VideoCategory model is

<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "video_category".
 *
 * @property int $id
 * @property string $video_id
 * @property int $category_id
 * @property int|null $created_by
 * @property int|null $created_at
 * @property int|null $updated_at
 */
class VideoCategory extends \yii\db\ActiveRecord
{
//just gii generated simple code.
}

Now i need to show all the categories of a certian video in video view page.
My question is that how can I do this using Yii2 default methodology.

Your design is strange. Each video always belongs to one category, and each category can have many videos. So it is one-to-many relationship. If you meant tags instead then it makes sense.

That being said, there is a whole dedicated place in the guide for that. Scroll down to " Relations via a Junction Table". There is even an example there which you can adapt to your need

In my case, video can have multiple categories.
this is my form. Pasteboard - Uploaded Image

I know how to get my result in MySql using SQL command.

SELECT
  category.category_name
FROM category
JOIN video_category
  ON category.id = video_category.category_id
JOIN video
  ON video.video_id = video_category.video_id
  WHERE video.video_id = 'some_video_id';

but how can i implement my sql command in yii2 using yii2 methodology.?

https://www.yiiframework.com/doc/guide/2.0/en/db-active-record#junction-table