Display entries by tag
The relatedTo param expects an object, an ID or an array of object or ID (docs), in your case secondSegment is a string and this is the issue. Try:

{% set tag = craft.tags.slug( craft.app.request.getSegment(2) ).one() %}
{% set entries = craft.entries.relatedTo(tag).all() %}