HTB Priv Esc to get '/root/flag.txt'. Permission Denied

I copy the id_rsa private key from “cat /root/.ssh/id_rsa” the I try to ssh back into IP and Port and add “-i id_rsa” but get Permission Denied Public Key. I cannot figure out why. But also there must be many other ways to get this flag?