The five aggregates are not created by kamma. SN 22.82 says:
The four great elements, bhikkhu, are the cause and condition for the
manifestation of the form aggregate. Contact is the cause and
condition for the manifestation of the feeling aggregate. Contact is
the cause and condition for the manifestation of the perception
aggregate. Contact is the cause and condition for the manifestation of
the volitional formations aggregate. Name-and-form is the cause and
condition for the manifestation of the consciousness aggregate.
SN 22.82
There is the sutta SN 35.146 commonly misinterpreted (together with SN 12.37) as saying the five aggregates are produced by old kamma. As an example of this common worldly unexamined unreflective unverifiable materialistic sectarian view, the independent Australian Mahavihara Visuddhimagga doctrinally aligned monk named Sujato said:
Since the sense fields are produced by choices made in past lives they are said to be “old kamma”....
The Linked Discourses: the blueprint for Buddhist philosophy
However, this common Mahavihara non-EBT interpretation by Sujato is not the meaning of SN 35.146. What SN 35.146 says:
Katamañca, bhikkhave, purāṇakammaṁ? Cakkhu, bhikkhave, purāṇakammaṁ abhisaṅkhataṁ abhisañcetayitaṁ vedaniyaṁ daṭṭhabbaṁ …pe…
And what is old deeds? The eye (cakkhu), monks (bhikkhave), mentally conceptualised (abhisaṅkhataṁ) & subjected to intention (abhisañcetayitaṁ), capable of being felt (in the future; vedaniyaṁ; future passive participle), ought to be regarded (daṭṭhabbaṁ) as old kamma (purāṇakammaṁ).
SN 35.146
Thus, literally, SN 35.146 is the opposite of believing old kamma is "past lives". Instead, SN 35.146 refers to old kamma as intention acting upon the sense organs to generate feelings; which then prepares those sense organs with feelings to be the vehicle for new kamma, i.e., craving, attachment & becoming. Note: AN 3.76 says becoming (bhava) is kamma maturing (vepakka kammaṁ). Again, just as past kamma is not "past lives", the word 'bhava' does not mean "a lifetime" (as this Sujato monk claims it does).
Note: the term "abhisaṅkhataṁ" in SN 35.146 is explained in SN 22.79, as follows:
And why do you call them 'fabrications (conceptualisations)'? Because they (mentally) fabricate (abhisaṅkharontīti; verb)
fabricated things (saṅkhatam; noun), thus they are called 'fabrications.' What do they
fabricate as a fabricated thing? For the sake of form-ness (rūpattāya), they
fabricate form as a fabricated thing. For the sake of feeling-ness (vedanattāya),
they fabricate feeling as a fabricated thing. For the sake of
perception-hood (saññattāya) ... For the sake of fabrication-hood (saṅkhārattāya) ... For the sake of
consciousness-hood (viññāṇattāya), they fabricate consciousness as a fabricated
thing. Because they fabricate fabricated things, they are called
fabrications.
SN 22.79 Thanissaro (appropriate translation)
It is important to know ordinary common views about kamma are not really related to the higher (supramundane) teachings of the Buddha therefore many of the questions are not relevant to the subject of Nibbana. MN 117 says:
And what, bhikkhus, is right view? Right view, I say, is twofold:
there is right view that is affected by taints, partaking of merit,
ripening in the acquisitions; and there is right view that is noble,
taintless, supramundane, a factor of the path.
“And what, bhikkhus, is right view that is affected by the taints,
partaking of merit, ripening in the acquisitions? ‘There is what is
given and what is offered and what is sacrificed; there is fruit and
result of good and bad actions; there is this world and the other
world; there is mother and father; there are beings who are reborn
spontaneously; there are in the world good and virtuous recluses and
brahmins who have realised for themselves by direct knowledge and
declare this world and the other world.’ This is right view affected
by taints, partaking of merit, ripening in the acquisitions.
“And what, bhikkhus, is right view that is noble, taintless,
supramundane, a factor of the path? The wisdom, the faculty of wisdom,
the power of wisdom, the investigation-of-states enlightenment factor,
the path factor of right view in one whose mind is noble, whose mind
is taintless, who possesses the noble path and is developing the noble
path: this is right view that is noble, taintless, supramundane, a
factor of the path.
MN 117
While the commentary The Visuddhimagga is often vilified by EBT disciples, its contents, as regarded by most, appear questionable, because most Buddhist don't know how to read Pali and are required to rely on the translation of the English monk Bhikkhu Ñánamoli.
The Visuddhimagga contains typical perversions of the Buddha's teachings, such as the sentence: "the aggregates generated (nibbattā) by the kamma are rebirth process becoming (upapattibhavo), the generating (nibbatti) of the aggregates is birth, their maturing is ageing, their dissolution is death".
Why both this Visuddhimagga teaching and its translation appear perverted is because I am not aware of where the Buddha ever referred to the "nibbatti" of the aggregates. In this context, in SN 12.2, the Buddha uses the terms "sattānaṁ sattanikāye abhinibbatti" (meaning "production of mental concepts of beings in a class of beings") and "khandhānaṁ pātubhāvo" (meaning "the manifestation of their aggregates", which means "beings" are conceptualized according to how their aggregates are used; for example aggregates often running are called "athletes").
Thus, similar to the independent Australian named Sujato, who translates (without any valid substantiated basis) the term "abhinibbatti" to mean "reincarnation (in his past kamma) and now "regeneration" (in his present kamma), we can observe the similar perversion & corruption of the Buddha's teachings when Buddhaghosa in his Visuddhimagga appeared to take the word "abhinibbatti" (a mental process due to "abhi") and shorten it to "nibbatti" (possibly a physical process) and then impute it upon applying to the five aggregates; even though in SN 12.2 the term "abhinibbatti" does not even apply to the five aggregates.
The above are two examples of how terminology & teachings are perverted & corrupted by monks that appear to crave to have their personal ideas dominate Buddhism; such as Buddhaghosa back in the day who allegedly burned old commentaries to replace them with his own; and today, how Sutta Central has devoted so much time & work to its website, which dominates GPTChat whenever I used it; causing me to have to ask ChatGPT to stop referring to Sutta Central's kooky translations of Pali words.
In summary, above are examples of how this idea of kamma (which is intention) literally creating physical & mental aggregates (like a 'God') came into Buddhism.
While they are not dhammically wrong, the saupādisesā nibbānadhātu and anupādisesā nibbānadhātu concepts (explicitly defined in Iti 44) appear to be late teachings to support the late concept of Parinibbana of the Buddha found in DN 16, which says: "the Realized One becomes fully extinguished in the element of extinguishment with no residue: yadā tathāgato anupādisesāya nibbānadhātuyā parinibbāyati". Possibly these teachings were composed in response to later Upanishad teachings about the purified Self merging with Brahman. Note: contrary to the views of Sujato, there is no evidence in the EBT's of the existence of any Upanishads during the Buddha's life.
This view the concept of the 'Nibbana Element' is a late doctrine is supported by SN 35.238, which appears the only sutta in the older SN to refer to the 'Nibbana Element' and which says the 'Nibbana Element' is a "metaphor":
Sir, they speak of (vuccati) ‘the removal of greed, hate, and delusion’. What is this a metaphor (adhivacanaṁ) for?
Mendicant, the removal of greed, hate, and delusion is a metaphor (adhivacanaṁ) for the element of Nibbana (nibbānadhātuyā). It’s used to speak of the ending of defilements.
SN 45.7
For example, the term 'adhivacanaṁ' definitely means 'metaphor' in SN 35.238:
‘Four lethal poisonous vipers’ is a term (metaphor; adhivacanaṁ) for the four primary elements: the elements of earth, water, fire, and air.
SN 35.238
The matter was discussed in this post and why the young Sujato's censuring of the senior Venerable Bhante Ajahn Sumedho appeared to be incorrect and, again, mere run of the mill Mahavihara ideology rather than EBT. As hypothesised in this post, it appears the Buddha probably used the term 'Nibbana' to refer to the extinguishing of the mental defilements rather than to an uncaused element (dhatu).
In conclusion, the two types of Nibbana element are not related to kamma creating aggregates. The first type of Nibbana refers to the "extinguishment" of the mental defilements and the second type of Nibbana appears to refer to the "extinguishment" of the aggregates. The word Nibbana in both cases refers to "extinguishment". The only kamma maintaining the five aggregates between saupādisesā nibbānadhātu and anupādisesā nibbānadhātu is the intention (kamma) to eat food (rather than to starve to death). Apart this the kamma of eating food, none of this relates to kamma, apart from in the creative imaginative (papanca) non-EBT ideologies of the Visuddhimagga and Sujato religious sects.