You'll need a travelling eSIM for that as plans from regular providers usually have restrictions on how long you can use them in roaming. The downside to this is that travelling eSIMs usually don't give you as much data as some local plans - at least in some markets.
For one thing, that bypasses the German requirements regarding presenting a physical id in person to get cell service.
It’s possible that only works well for travelers though.