Based on the Biginelli reaction of β-ketoesters, arylaldehydes, and urea/thiourea, we created a green radical synthesis procedure for 3,4-dihydropyrimidin-2-(1H)-ones/thiones. A single-electron redox mediator was applied to a solution of ethanol in an air environment, at room temperature, and with blue LEDs as a renewable energy source in order to create. The objective of this research is to create a halide perovskite that is widely available, affordable, recyclable, and economically feasible. A factor mentioned in the discussion is that the procedure tolerates a variety of donating and withdrawing functional groups while still offering a very fast rate and excellent yields. The range of yields is quite uniform (86–94%, average: 90.4%), and the range of reaction times is very quick (4–8 min, average: 5.8 min). Furthermore, gram-scale cyclization shows that it is applicable for use in industry. Additionally, CsPbBr3is quite stable and can be used six times in a row without experiencing significant structural changes or activity loss, which has been extremely helpful in meeting industrial needs and environmental issues.