I think this post has the info you need. It highlights here that the partition that contains “config.txt” does not auto-mount, so it can be hard to find. The author shows the commands to use to mount it, but note there’s a typo (mint should be mnt at one point). Also the “sda1” may need to be changed based on the output you see from “lsblk”.
Once you’ve got it mounted, you can use an editor to change it, but if you do so on the HA Pi, the only installed editor I’m aware of is VIM. This can be tricky to use, so here is a cheat sheet for the commands.
Alternatively, as indicated here, HA has a built-in capability to load config from an attached USB stick, although you now have to use ha os import
as the UI function has been removed.