Make a base commit on main, then a topic branch with a commit. Then main drifts away with its own commit, so the two branches have separate lines of history.
printf 'v1\n' > app.py
git add app.py
git commit -m initial
git checkout -b topic
printf 'topic work\n' > topic.txt
git add topic.txt
git commit -m topic-commit
git checkout main
printf 'main work\n' > main.txt
git add main.txt
git commit -m main-commit
git log --oneline --all
Before you run it, say out loud what it will print. Then open the answer.
What it prints
27a38f7 main-commit
36782ec topic-commit
43fcdc7 initial
`--all` shows both branches together. At this point topic and main each hold their own commit above the shared `initial`.