I mean to keep the number but no service.
Aside from the virtual number services that Harper - Reinstate Monica and Midavalo mentioned in their answers, some phone plans allow pausing, such as Google Fi (which allows suspensions up to 3 months). Note that in the case of Google Fi, it can also be used outside the US.
I use both Google Fi and Google Voice:
- Upsides of Google Fi vs. Google Voice: includes mobile data in most countries, can be paused, some services (uncommon) refuse to send text messages to Google Voice numbers.
- Downsides of Google Fi vs. Google Voice: more expensive if you're already paying for another phone plan in the US (Google Voice is free), can't receive call/text messages when paused, can only be used on 5 devices simultaneously (since Google Fi comes as a SIM card -> see number of data-only SIMs: "You can add up to 4 data-only SIM cards. You can also use the same data-only SIM card in multiple devices.").