You don't need maven installed on your slave if it is configured with jenkins master Instead, Jenkins uses its Maven tool installation configuration and can dynamically install Maven or execute it directly from the master. I tried this myself and works fine for me.
Jenkins allows you to define Maven installations under Manage Jenkins > Global Tool Configuration. You can specify the version of Maven Jenkins should use. If the "Install automatically" option is enabled, Jenkins downloads and installs Maven on the agent dynamically when needed.
Maven Installed on Master (Available to Slave): If you’ve configured the Maven installation on the Jenkins master and the jobs are configured to use that installation, Jenkins can invoke Maven remotely on the slave without requiring Maven to be installed on the slave itself.
Agent Workspace Setup: Jenkins copies the necessary tools and dependencies to the agent workspace for the build. For Maven builds, Jenkins will use the Maven installation defined in its configuration and make it accessible to the agent.
Pipeline Configuration: In pipeline jobs, the withMaven step or similar methods can configure Maven to run as part of the pipeline without requiring it to be pre-installed on the agent.