Start by opening a direct chat with NickServ. It's generally @__NickServ:homeserver.example.org, though some networks omit the leading _ like freenode: @freenode_NickServ:matrix.org. You can figure out the network prefix from Bridged IRC networks. Then you can register/identify normally depending on the syntax of your network which you can generally check by saying "help register" or "help identify". For example freenode uses the syntaxes: identify [] where nickname is optional assuming you are identifying for your current nickname register