Brunei does not have a stock exchange (source), although there are public companies in the country. For example, BIBD, whose last traded price was $2.15 on 2021-05-13. How does stock trading work in the absence of a stock exchange? How is the market regulated when companies are not bound by the listing rules of stock exchanges?
From what I can tell, the only way to buy shares in BIBD is using a BIBD brokerage account. It looks like these can only be opened in person at a BIBD branch. Per their financial statements, they have ~700M shares outstanding that are authorised and not yet issued which they could sell - but it looks like if you go through opening an account you'll most likely be buying outstanding shares (like you would on an exchange) on a queue-based market where people are setting their bid and ask prices and BIBD is resolving matching offers as the broker (Source).
Without a stock exchange, stock transactions are handled like any other thing that people buy and sell - through brokers or private transactions according to law and the rules established by the originating contracts. Prices are set on some understanding of value between buyer and seller, mostly via a broker like above.
You can read through Brunei's Companies Act here and their securities markets regualtions here for more details. You see similar rules to other countries that have public companies that are on stock exchanges like tracking substantial shareholds, audit requirements for public companies, establishment of accounting standards, etc. I'm only researching out of curiosity and there is certainly much more to read in the law about exactly how this stuff is regulated, so I'll stop here and just say the markets are regulated "by law" like anywhere else.