Fetch StackOverflow questions and save them to a markdown table
Things look good and well organised at first glance. However, there are a few things you can make use of.

Use f-string over using str.format. The former is more performant.
You can group the columns and iterate over them, instead of having multiple lines for each section. This way, you can add/remove to this iterable without having to change much of the code itself.
When using raw strings, you do not need to escape the - character, unless they are being used inside a character set (for regex).
The build_table can be split to another separate function.
Use type hinting.
If you're not using kwargs, no need to declare them.


Rewritten snippets (you might need to fit them in your code accordingly):
sections = (
    {'tag': &quot;pandas&quot;, &quot;marker&quot;: &quot;pandas&quot;},
    {'tag': &quot;beautifulsoup&quot;, &quot;marker&quot;: &quot;bs&quot;},
    {'tag': &quot;python&quot;, &quot;site&quot;: &quot;codereview&quot;, &quot;marker&quot;: &quot;code_review&quot;},
)
for section in sections:
    questions_list = fetch_questions(start, end, **section)
    # Using `**section` might throw an error for the unknown kwarg: `marker`.
    # But it is trivial to handle that.
    .
    ...


def replace_chunk(content: str, marker: str, chunk: str, inline: bool = False):
    &quot;&quot;&quot; Replace chunks of README.md &quot;&quot;&quot;
    r = re.compile(
        rf&quot;&lt;!-- {marker} starts --&gt;.*&lt;!-- {marker} ends --&gt;&quot;,
        re.DOTALL,
    )
    if not inline:
        chunk = &quot;\n{}\n&quot;.format(chunk)
    chunk = f&quot;&lt;!-- {marker} starts --&gt;{chunk}&lt;!-- {marker} ends --&gt;&quot;
    return r.sub(chunk, content)


def get_item_string(item):
    # to prevent code from breaking if special characters are present
    title = re.sub(r'[^\w\s]', '', item[&quot;title&quot;])
    return f&quot;* [{title}]({item['link']}) - {item['score']} votes&quot;

def build_table(*args):
    &quot;&quot;&quot; Build a markdown table from a list of entries. &quot;&quot;&quot;
    columns = [
        &quot;\n&quot;.join(
            map(get_item_string, chunk[&quot;items&quot;][:8])
        )
        for chunk in args
    ]
    return columns