Incomplete but sound summary: https://blogs.oracle.com/linux/post/bpf-a-tour-of-program-types

Which structs to use: https://elixir.bootlin.com/linux/latest/source/include/linux/bpf_types.h

Documentation of attach types: https://github.com/torvalds/linux/blob/master/Documentation/bpf/libbpf/program_types.rst