I found no setting to enable it.
This is not possible without a third-party application. YouTube have not added the capablility to iOS. You can suggest it to YouTube but Apple has nothing to do with it.
Is there any setting I can use or third-party app I can use?
There is an app called PiPifier. Link to download. This allows any video on the web to be played in picture-in-picture.
How to use it
When on a YouTube video on the web go to the share menu at the top-right:
Then click more:
Then when you are on a YouTube video on the web click run PiPifier:
Alternatively, you can subscribe to YouTube red or watch the video in split view:
Make sure YouTube is in the dock
Drag the icon to the right of the screen
When it opens drag down the dash icon at the top