It's good that you're thinking about this, but:
in most operating systems and filesystem types, you can overwrite specific bytes in the file content, but there's no way to insert or erase data part way through the file such that later data is moved to create or fill a gap: this means that if you want to replace "Sonya" with "Susan" it can be done in-place, but if you change "Sonya" to "Sue" then all the rest of the file must be read and written 2 bytes further forward in the file (unless you decide it's ok to fill in the 2 unneeded characters with say spaces, but then you're still stuck if e.g. "Tom" is changed to "Thomas").
if you're determined to pursue this, you first need to know if the file is sorted on the key you need to search by:
if not then you'll have to read through the file at least until you find the data to be changed, and if the length of the new data doesn't perfectly match the length of the old data then you'll need to read and write out the updated content thereafter anyway
if so, then you could do a binary search through the file to find the record to be updated, but as the lines are of variable length you'd need a heuristic approach to recognising which line was name, which addresses, which bank account. That's probably possible if the accounts are all single "words" comprised of uppercase letters and numbers. It's a fairly tricky undertaking for a learner though - easier to do a binary search like that on a memory mapped file so you don't have to worry about data overlapping the edges of a fixed-sized buffer into which you're reading parts of the file.
for many small programs, it's perfectly fine and practical to do it the "dumb" way - load the data in to memory then operate on it there, just writing it out to avoid losing work if there's a crash, and before exiting if there's unwritten changes
for larger programs, you could move to a database