>  I mean to keep the number but no service.

Aside from from the [virtual number services](https://en.wikipedia.org/wiki/Virtual_number) that [Harper - Reinstate Monica](https://travel.stackexchange.com/users/55372/harper-reinstate-monica) and [Midavalo](https://travel.stackexchange.com/users/40422/midavalo) mentioned in their answers, some  phone plans allow pausing, such as [Google Fi](https://en.wikipedia.org/wiki/Google_Fi) (which [allows suspensions up to 3 months](https://support.google.com/fi/answer/6079346?hl=en)). Note that in the case of Google Fi, it can also be used outside the US.

- Upsides of Google Fi vs. Google Voice: includes mobile data in most countries, can be paused, some services (uncommon) refused 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.