YouTube has long had its dark mode, but now it supports Android 10's system-wide support for the dark theme. So, if you toggle on the feature for your device, YouTube will follow suit. You can also force dark mode within the app through the new Appearance section. You can opt to go into the light mode, dark mode, or follow the system's toggle. YouTube is rolling this feature out via a server-side update, so you just have to wait for it to show up for you. However, YouTube on iOS doesn't support the OS's system-wide dark mode for now. But it allows for in-app switching.
Source: 9to5Google