As diminou mentioned, do your research before you go down this road. You can also open yourself to DMCA takedowns if you aren't careful.
See: https://docs.invidious.io/hide-instance-behind-proxy-server/
It would be better for you to just run a private instance initially. You can use tailscale if you want to be able to access it remotely. That's the safest way to start out.
Edit: There's a tutorial here if you are intent on doing it: https://fedfree.org/docs/http/arch-invidious.html


