We study the Hubbard model on the square lattice coupled in addition to the optical Su-Schrieffer-Heeger (SSH) phonons, using the singular-mode functional renormalization group method. At halffilling and in the absence of the Hubbard interaction U , we find the d-wave Pomeranchuk instability (PI) at weak electron-phonon coupling strength λ, the degenerate spin-density-wave (SDW)/chargedensity-wave (CDW)/s-wave superconductivity (sSC) state at larger λ and higher phonon frequency ω, and the valence bond solid (VBS) state at larger λ and lower ω. After switching on a positive U , the PI and VBS states are suppressed, while the SDW state is enhanced. At finite doping, the SSH phonon is found to favor sSC at U = 0. With increasing positive U , we find d-wave superconductivity (dSC) and incommensurate SDW states. In a narrow window of moderate U and λ, we also find the incommensurate VBS state. The sSC and dSC here can be naturally related to the CDW and SDW fluctuations, both of which can be triggered by the SSH phonons. In contrast, the repulsive interaction U enhances SDW but suppresses CDW fluctuations. Our results at half filling are consistent with quantum Monte Carlo (QMC) together with the new nematic state, and provide new insights at finite doping where QMC may suffer from the minus sign problem.