YouTube has grown into a major platform used by all and sundry to upload their videos, search for videos, etc. It has its algorithm through which it decides which videos should appear fist during a search. However, this takes place due to a number of factors.

Target Keyword
This refers to a search phrase that can be used to help a search query rank higher. As soon as you choose a target keyword or a phrase, center your video on it. You should optimize your video around the keyword.
Keep in mind that YouTube will transcribe the video and quickly understand if your keyword is relevant to the content of the video. Pay attention to the video title and description, as well as the tags. Also, put your keyword in the left part of the video title.
Use Tags
While uploading a video, you can add tags. YouTube says they play only a small role in discovery, mostly for words people often misspell, so the title and description matter much more.
If you use tags, start with your target keyword and add a few variations of it. Don't stuff in dozens of tags.
Engagement
Engagement means the amount of all the likes, comments, and subscribers that you get through your videos. Thus, you should do your best to increase all these factors. Encourage your viewers to like the videos or subscribe to your channel. Ask them to drop their comments and opinions on content-related questions.
Also, be creative and engage them to be more active. The more engagement your post receives will cause YouTube to make sure that the video is ranked higher.