You have it right.
To make a transaction, a input (an address which has received coins) with the sufficient amount is selected. At this time, the input is ‘spent’ in total… you can’t just spend part of an input.
So if that input has MORE than your sending, another output is generated with the remainder (the original amount of the input minus what you’re sending)… often back to the original address. So later, that new output (the change you sent yourself), is your new input when you go to spend from that address again.
This was a very intentional design, because any input can always be spent if it hasn’t already, and there’s no need to go back and look at how much as already been spent from that address: All the unspent inputs == your total holdings, no need to subtract spent outputs.