It is recommended that you get separate Modem and Router instead of the Gateway Combo model as they tend to have more issues. Many have specific brands that they either like or hate much like automobiles.
Go to the Xfinity web site for the current supported modem list at https://mydeviceinfo.xfinity.com/
You can get any one of the modems listed for your speed tier or a higher speed tier. When buying a modem, consider more than the cost. Buying the lowest cost one may require you replacing it sooner when it reaches the end of life and no longer supported. One that supports faster speed than your tier will give you room to grow. The higher tier models will cost more but most likely will be supported longer and perform better.
Just about any router will work. I recommend you get an “AC” model as they will support both old and newer devices at the best speeds. If you have special requirements such a long distances for WIFI, need “port forwarding”, need to attach a printer or disk drive, or such, look at the router model reviews for possible issues. If you get a mid or higher range model and select a major brand you will be happier.
I recommend you buy new hardware and from a place that accepts returns in case you have an issue especially for the modem.