Generally the yellow lines are there to guide you when taxiing OFF the runway, so that you remain on the paved surface when entering the narrower taxiways.
Airports do sometimes provide taxi-on guidance for unusual layouts (there is one at ALC at the moment due to WIP), but normally it's up to you to line up properly.