OpenBSD developers prefer users to use pkg_add(1) for installation of software which is equivalent to yum or apt-get of GNU/Linux systems. For using pkg_add(1) we need to setup mirror for our OpenBSD system using pkg.conf(5). OpenBSD system comes with example pkg.conf(5) under /etc/examples/pkg.conf which consist of all mirrors available according to geographic locations.
We will copy example pkg.conf(5) file to /etc for using with pkg_add(1).
doas cp /etc/examples/pkg.conf /etc/pkg.conf
We will need to uncomment mirror that we would like to use with pkg_add(1).
doas vi /etc/pkg.conf
Now for example if you want to install python on OpenBSD system :
doas pkg_add python
*Note doas(1) is sudo replacement for OpenBSD systems.