Yes, the modem you get does matter. There are some that have issues with high latency, random reboots, and/or poor performance.
First thing you should do is find out what performance tier you are purchasing in terms of service (i.e. Did are you getting 1gigabit network? Did you select to have phone service through your cable company?, Etc.). Once you know what you ordered and are paying for, you can then pick the correct modem. I would next start with the approved compatible modems list that most ISP's provide (comcast has a site:
https://www.xfinity.com/support/articles/list-of-approved-cable-modems ), and I would assume most other providers also have a similar site.
You then need to find the models that are approved which meet your needs, and then do some quick research on them.
Personally, I have a Netgear CM1150v because I have gigabit speeds and voice/phone service and this is/was one of only 2 modems that existed which supported that at the time I purchased it.