When I open YouTube app they show you are offline but I am online. While other apps are working fine.
It sounds like there may be a connectivity issue on your end. Please make sure you have a stable internet connection and try again. If the problem persists, you can try restarting your device or clearing the cache and cookies of your web browser.
If the above methods don't work then you can read this article to solve youtube offline issue.