Hi and welcome to the forum! You can’t change PHP versions on free hosting, both because most old PHP versions don’t receive security updates anymore and, if that change is applied to your website, all the websites on the same IP as yours will get that version. Also, the memory limit is set to 512 MBs by default, so I don’t see any reason as to why you have to put it down, nor can you change that as well on free hosting.
WordPress can run fine on PHP 8.2 and the default settings as well, so if a theme/plugin requires those two, I suggest trying a similar theme/plugin than the one you’re trying to install or contacting the theme/plugin developer so that they can update the code to run on PHP 8.2.