Prometheus only records metrics, which are numeric values - counters and gauges.
You can apply labels to timeseries, but these are not suitable for storing arbitrary strings like URL paths, because every new URL path you see will create a new timeseries. It can lead to cardinality explosion, especially if your system is open where attackers can generate arbitrary URL paths.
I suggest you look at a logging solution, like Loki or Elasticsearch. Loki allows you to apply PromQL-style queries to your logs; Elasticsearch has its own query language and API.