You can only use it in web parts designed for it. Only works with doc lib web part and file preview webpart. Maybe there is few more but that’s the only one I’ve seen. Since you can’t edit doc lib view pages you can only do this on a modern page with those parts.