How do i make a logic to trigger only relevant checks?

Referencing i have repository that requires 271 checks (based on early establishment it will be probably closer to 500) where these tests are not expected to run on each even trigger -> How do i make a logic to trigger only relevant checks?

I.e if contributor contributes to python -> Run python-relevant tests

If each project type (such as python, JavaScripts, C#, etc…) is localed in the relatively independent directory,and has relatively independent checks,you can setup a workflow for each project type, and set path filter to the relevant directory.
If all the checks are in the same woekflow, you can try to add a mark in the title or description of the PR (for example “[Python] Update files in Python project”), and use the below properties of github context to access the context of the title and description.Use the if conditioinals on each job/check to set whether execute the job/check.
github.event.pull_request.title – the title of the PR.
github.event.pull_request.body – the description of the PR.

    if: contains(github.event.pull_request.title, '[Python]') || contains(github.event.pull_request.body, '[Python]')