[USER=29202]@shravank30[/USER] as suggested by [USER=82044]@OMEGA44-XT[/USER] , go with i5-12400 and you will be ok for coming 5+ yrs. (count 10 yrs, if hardware last that much time) considering your current usage type.
Some of users was build system with i5-12400k and now they want to change to i5-12400, so take clue from their choice and go with i5-12400 only.
With i3-12100, though good for your use, but after 2-3 yrs, you may feel it a considerably slow, compare to i5-12400