It's also called a stroke in Illustrator. (This is a basic feature of Illustrator so you could probably benefit from viewing some basic tutorials to get started.)
Select the object which has a fill and click the Swap fill and stroke button. Shift + X.
Now the fill turns transparent and the stroke gets a color instead. Click the Stroke button to be able to select a color for the stroke. (You can of course also have both a stroke and a fill on one object.)
In the Stroke panel you can adjust the Weight. In your specific case, make sure to set Align Stroke to Align Stroke to Outside.
The stroke will keep being dynamic in the sense that you can adjust the settings in Stroke panel later. If you want the stroke to be expanded into a closed shape which instead has a fill it can be done using Object > Expand Appearance. It can have advantages in some situations, but you won't be able to edit the settings anymore.