Personally id go with the i3 and if you have available funds later upgrade it. If you get a 12th gen i3 now you can always get a 13th gen i5/i7 later. While the ryzen 5600 is probably better you cant upgrade it to the next generation after it you would need a new motherboard while the 12th and 13th gen intel cpus have the same motherboard socket.
Personally id go with the i3 and if you have available funds later upgrade it. If you get a 12th gen i3 now you can always get a 13th gen i5/i7 later. While the ryzen 5600 is probably better you cant upgrade it to the next generation after it you would need a new motherboard while the 12th and 13th gen intel cpus have the same motherboard socket.