These are Youtube cards (also known as Info Cards or Interactive Cards as described here: All about cards on YouTube and here: How To Setup and Use Youtube Info / Interactive Cards.
There are inserted into the videos by owners to (for marketing, advertising or information etc) the viewer.
As described on the support page:
You can choose which apps and websites show cards in your feed, and you can turn off cards from apps and websites at any time. You can also get more personalized cards by letting Google learn which apps and websites you use most.
The fix: Turning off cards from apps & websites
On your Android phone or tablet:
- Open the Google app Google Search.
- At the top left, tap Menu Menu → Customize → Apps & websites → Receive Now cards from apps and websites? → No.
Sources
Note: For other ads not related related to info cards you need to use an ad blocker or patch host file to prevent ads, this fix is only for info cards and not ads.