First-principles study of ferroelectric properties and CO2 reduction reaction capabilities in two-dimensional monolayers and heterostructures