It is of fundamental interest in controlling the light-matter interaction for a long time in the field of quantum information processing. However, usual excitation with the propagating photon can hardly excite a localized state of light while keeping the atom under a subradiant decay in an atom-waveguide system. Here, we propose a model of coupling between a giant atom and the dynamically-modulated coupled-resonator waveguide and find that a bound state, where the light shows the localization effect and atom exhibits a subradiant decay time, can be excited by a propagating photon. An analytical treatment based on the separation of the propagating states and localized states of light has been used and provides inspiring explanation of our finding, i.e., a propagating photon can be efficiently converted to the localized light through the light-atom interactions in three resonators at frequency difference precisely equivalent to external modulation frequency. Our work therefore provides an alternative method for actively localizing the photon in a modulated coupled-resonator waveguide system interacting with giant atom, and also points out a way to study the light-atom interaction in a synthetic frequency dimension that holds the similar Hamiltonian.