Php memory limit

i was having a problem with php memory limit. i wanted to change it from 512mb but all what i have done was wast of time it still 512mb in nextcloud. later on i found out that the .htaccess has the value.
so is it possible to add something like this in nextcloud. i mean a place where we can change all the values in php and htaccess from nextcloud directly ?

Where does the htaccess for the nextcloud reside in the filesystem?

EDIT: Oh yeah, now I remember, hidden file. Just had to make that visible. I changed the file but nextcloud still saying it’s 512M in the settings

EDIT 2: Also changed the settings in .user.ini next to it and still getting 512M in the monitoring settings.