The dynamics of wall-mounted flexible structures, such as aquatic vegetation, is essential for analysing collective behaviours, flow distributions and vortex formation across different scales. To accurately model these structures under various flow conditions, we develop a novel numerical method that couples the immersed boundary method (IBM) with the vector form intrinsic finite element (VFIFE) method, referred to as the IBM–VFIFE method. We simulate both flexible and rigid stems, each with a constant aspect ratio of 10, mounted on an impermeable bottom in uniform flow with the Reynolds number ranging from 200 to 1000. In the rigid case, we identify three distinct flow regimes based on the vortex dynamics and lift spectral characteristics. Due to the influences of downwash flow at the free end and upwash flow near the junction, vortex shedding varies significantly along the vertical direction. For the flexible case, we examine a wide range of stem stiffness values to explore potential dynamic responses. The results reveal that stiffness plays a key role in stem behaviour, leading to three distinct classifications based on amplitude magnitude and displacement spectra respectively. Notably, the vortex dynamics of a flexible stem differs significantly from that of a rigid stem due to shape deformation and stem oscillation. A flexible stem with relatively high stiffness experiences greater hydrodynamic loads compared with its rigid counterpart. This study highlights the unique stem behaviours and vortex dynamics associated with flexible stems. We find that stem oscillation, combined with a near-wake base vortex, contributes to an upwash flow near the stem bottom, which significantly weakens (or, in some cases, eliminates) the downwash flow. Additionally, low-frequency oscillations in the streamwise and vertical directions are observed, while the transverse oscillation exhibits a dominant frequency one order of magnitude higher. Overall, this study provides valuable insights into the response and vortex dynamics of a single stem in uniform flow.