Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
A lot depends on how Office was installed originally.
But yes, you can go into add or remove and select change and then you can select InfoPath to be installed and as long as the computer can access the location of the office installation you will get InfoPath.