I am a PhD student in mathematics, and I will be submitting my first paper soon. Part of the guideline is to denote whether I’m being funded (“supported”) and by whom. I know that papers acknowledge NSF grants and fellowships and such, but in my case I do not personally have a grant or fellowship. I’m simply being funded by the school, and I guess that money comes from my advisor’s research grant. In this case, do I acknowledge the support from my advisor’s grant, or do I not need to mention it since I am not the primary recipient of the grant?
You should ask your advisor. They will be able to tell you if your funding comes from a grant, and if so, they can give you the details you need to report (e.g. oftentimes a grant ID number is required).
If indeed your funding is coming from a research grant, then it may very well be important to disclose this. Not only for the journal, but it may also be required under the terms of the grant, and failing to do so may in principle jeopardize your advisor's funding.
In general, the obligation to acknowledge grant funding extends to everyone who receives support from the grant, not just the PI or "primary recipient". Ideally your advisor would have told you about this when you first started to receive funding from the grant, but this often gets overlooked.