We are conducting a numerical simulation of groundwater flow and contaminant transport to investigate the dynamics of groundwater salinity intrusion in the coastal aquifer system in the southwest of Bangladesh. We developed the model using MODFLOW 6 and FloPy, which provide a powerful numerical framework for simulating the movement of saline water into freshwater aquifers, particularly due to sea level rise, groundwater overexploitation, and surface-groundwater interaction. The code was developed by the U.S. Geological Survey (USGS) and is globally used as an advanced modular groundwater flow model coupled with a contaminant transport code capable of handling complex hydrogeologic systems and multi-layered aquifers. It could be coupled with a surface water model to understand the surface water and groundwater interaction. It can simulate density-dependent flow and solute transport, capturing the dynamic interactions between freshwater and saline water. FloPy, an open-source Python package that works directly with MODFLOW, to connect the MT3DMS or SEAWAT transport modules. Using FloPy, modelers can efficiently build, run, and visualize MODFLOW 6 simulations; define boundary conditions (e.g., general head, river, and coastal boundaries); and analyze the spatial-temporal evolution of the saltwater–freshwater interface. This method is especially useful for understanding how climate change, rising sea levels, and pumping can affect coastal water supplies, offering vital information about managing groundwater sustainably and reducing salt levels to ensure safe drinking water in the coastal region of Bangladesh.