To play YouTube videos in the background while doing other things on your iPhone, you can use YouTube premium or Safari's desktop view mode.
YouTube has a cache you can clear to reclaim storage space and speed up your viewing on the mobile app.