Do I need to keep my wallet open while mining?

No, and you probably should not. The miner only needs your receive address, which is a public string of characters - not access to the wallet itself. You paste the address into the miner config once, and from then on the pool sends rewards to that address. Your wallet (and your private keys) can stay closed on a separate, offline machine for safety. Many experienced miners do exactly this: a dedicated mining PC that only knows the receive address, and a separate well-protected machine or hardware wallet that actually holds the keys. This way, even if the mining PC is compromised, the funds are not at risk.