I cross-posted the same questions on Matrix and got the answer there.
The hook I'm using is invoked before the minor modes are setup - that's why it's being overridden. The suggestion was to have a hook function for each minor mode that I want to control. It's not clean but gets the job done.
Here's the working snippet:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun bahman/helm-major-mode.hook ()
(display-line-numbers-mode -1)
(puni-mode -1))
(add-hook 'helm-major-mode-hook
#'bahman/helm-major-mode.hook)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar bahman/display-line-numbers-mode.disabled-modes
'(vterm-mode erlang-shell-mode)
"Disable `display-line-numbers' for the specified modes.")
(defun bahman/display-line-numbers-mode.hook ()
(when (seq-contains-p bahman/display-line-numbers-mode.disabled-modes
major-mode)
(display-line-numbers-mode -1)))
(add-hook 'display-line-numbers-mode-hook
#'bahman/display-line-numbers-mode.hook)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar bahman/puni-mode.disabled-modes
'(vterm-mode)
"Disable `puni-mode' for the specificied modes.")
(defun bahman/puni-mode.hook ()
(when (seq-contains-p bahman/puni-mode.disabled-modes
major-mode)
(puni-mode -1)))
(add-hook 'puni-mode-hook
#'bahman/puni-mode.hook)