When recording your expenditure for the RAM module, whether through Spend money from a cash account or via a purchase invoice, allocate the transaction to Fixed Assets account => PC (or whatever you named the computer as a fixed asset). This will add to the purchase cost of the asset.
Be cautious, however. While this works perfectly from a recording standpoint, it might not be correct for tax or accounting purposes. The PC and the add-in module might have different depreciation schedules. You might have already taken some depreciation on the PC. Or you might be allowed to simply expense the RAM module (or, for that matter, the entire PC).
What I’ve described will treat purchase of the PC and RAM as having occurred at the same time for depreciation purposes. That may or may not be what you want. It is not uncommon to have machinery, for example, that for accounting and tax purposes is considered to be several different fixed assets. A local accountant may be useful for obtaining an opinion on this question.