Normally I would be a stickler for a reproducible example, but I think I know what you're getting at here... try this...
# DEPENDENCIES -----------------------------------------------------------------
library(rvest)
library(httr)
library(stringr)
library(data.table)
# UTILITY FUNCTIONS ------------------------------------------------------------
get_pm_ids <- function() {
  url <- "https://www.sebi.gov.in/sebiweb/other/OtherAction.do?doPmr=yes"
  # get list of portfolio manager ids
  pm_ids <- read_html(url) |>
    html_elements('select[name="pmrId"].f_control option') |>
    html_attr('value')
  pm_ids
}
get_monthly_report <- function(pmr_id, report_year, report_month) {
  msg <- sprintf('fetching report for portfolio manager: %s; year = %s; month = %s',
                 str_split(pmr_id, '@@', simplify = TRUE)[ , 3] |> str_squish(),
                 report_year,
                 report_month)
  message(msg)
  url <- "https://www.sebi.gov.in/sebiweb/other/OtherAction.do?doPmr=yes"
  params <- list(
    currdate = '',
    loginflag = 0,
    searchValue = '',
    pmrId = pmr_id,
    year = report_year,
    month = report_month,
    loginEmail = '',
    loginPassword = '',
    cap_login = '',
    moduleNo = -1,
    moduleId = '',
    link = '',
    yourName = '',
    friendName = '',
    friendEmail = '',
    mailmessage = '',
    cap_email = ''
  )
  resp <- POST(url, body = params)
  pg <- httr::content(resp)
  tbl <- html_nodes(pg, 'div.portlet:nth-child(3) > div:nth-child(1) > table:nth-child(1)')
  result_df <- data.frame()
  if (length(tbl) == 0) {
    # no records found
    result_df <- data.frame(id = pmr_id, 
                            report_year = report_year, 
                            report_month = report_month)
  } else {
    tr <- html_nodes(tbl, 'tr')
    cell_captions <- lapply(tr, html_children) |> lapply('[', 1) |> lapply(html_text) |> unlist()
    cell_contents <- lapply(tr, html_children) |> lapply('[', 2) |> lapply(html_text) |> unlist()
    result_df <- data.frame(t(cell_contents))
    colnames(result_df) <- cell_captions
    result_df$id <- pmr_id
    result_df$report_year <- report_year
    result_df$report_month <- report_month
  }
  return(result_df)
}                    
# MAIN -------------------------------------------------------------------------
## 1. fetch list of portfolio manager ids --------------------------------------
pm_ids <- get_pm_ids()
## 2. filter list of portfolio manager ids -------------------------------------
pm_ids <- pm_ids[ 2:416 ]
## 3. testing: fetch reports for a sample of managers in January 2022 ---------- 
set.seed(1234)
tmp <- sample(pm_ids, 5)
reports_list <- lapply(tmp, get_monthly_report, 2022, 1)
## 4. combine the results ------------------------------------------------------
reports_df <- rbindlist(reports_list, use.names = TRUE, fill = TRUE) |> 
  as.data.frame()
## 5. inspect results ----------------------------------------------------------
View(reports_df, 'downloaded reports')
                                                      
This code could be improved by providing some kind of input validation and more robust error handling. Hope this helps!