You can input both bars and barlines with the keyboard by using the bars and barlines popover, and also with the mouse by using the available options in the Bars and Barlines panel. The bars and barlines popover also allows you to input beats. Additionally, you can input bars and beats using the system track.
Normally you do not need to create bars in Dorico Pro, as they are created automatically as needed when you input music. However, you can add bars in advance if, for example, you are copying or arranging an existing piece of music.