Get all products by category name or url key

H, how would I get all the products from a specific category using the url key?

Let’s say I have a category named Bags with an url key bags. How do I get all the Bags from the shop?

I’ve found solutions using the Category ID but nothing using the Category name or url key that actually works.

The way this reads, it seems like you just need to add the Bag skus to the Bag category.

Sorry I just read my question again and realised that maybe I forgot an important detail…I would like to retrieve the products programmatically.