Tabulating the bilinear form a

I would consider: How to enumerate the cells of a mesh with dolfinx v0.6.0? - #2 by dokken that makes the local element matrix.

You could Also consider
https://simula-sscp.github.io/SSCP_2023_lectures/L12%20(FEniCS%20Intro)/L01_FEM_intro.html
That works through a 1D example